To repro: click on an `<input type=file>` in debug mode.
```
#
# Fatal error in ../../v8/src/api-inl.h, line 126
# Debug check failed: allow_empty_handle || that != nullptr.
#
#
#
#FailureMessage Object: 0x7ffee3550f30Received signal 4 <unknown> 00019dbc4f82
0   libbase.dylib                       0x00000001179e03b1 base::debug::CollectStackTrace(void**, unsigned long) + 33
1   libbase.dylib                       0x00000001176a5ecb base::debug::StackTrace::StackTrace(unsigned long) + 75
2   libbase.dylib                       0x00000001176a5f1d base::debug::StackTrace::StackTrace(unsigned long) + 29
3   libbase.dylib                       0x000000011769a0f5 base::debug::StackTrace::StackTrace() + 37
4   libbase.dylib                       0x00000001179e0221 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 1393
5   libsystem_platform.dylib            0x00007fff7a836b5d _sigtramp + 29
6   ???                                 0x000000000000ffff 0x0 + 65535
7   libv8_libbase.dylib                 0x000000019dbbc045 v8::base::(anonymous namespace)::DefaultDcheckHandler(char const*, int, char const*) + 21
8   libv8.dylib                         0x0000000172cc363e v8::Utils::OpenHandle(v8::Context const*, bool) + 270
9   libv8.dylib                         0x0000000172cc7366 v8::Context::Enter() + 38
10  Electron Framework                  0x000000010e3fbb29 v8::Context::Scope::Scope(v8::Local<v8::Context>) + 57
11  Electron Framework                  0x000000010e3fb88d v8::Context::Scope::Scope(v8::Local<v8::Context>) + 29
12  Electron Framework                  0x000000010e425314 v8::MaybeLocal<v8::Promise> atom::util::Promise::Then<void, bool, std::__1::vector<base::FilePath, std::__1::allocator<base::FilePath> > const&>(base::OnceCallback<void (bool, std::__1::vector<base::FilePath, std::__1::allocator<base::FilePath> > const&)>) + 132
13  Electron Framework                  0x000000010e4225fc (anonymous namespace)::FileSelectHelper::ShowOpenDialog(file_dialog::DialogSettings const&) + 236
14  Electron Framework                  0x000000010e421b6b atom::WebDialogHelper::RunFileChooser(content::RenderFrameHost*, std::__1::unique_ptr<content::FileSelectListener, std::__1::default_delete<content::FileSelectListener> >, blink::mojom::FileChooserParams const&) + 987
15  Electron Framework                  0x000000010e302e24 atom::CommonWebContentsDelegate::RunFileChooser(content::RenderFrameHost*, std::__1::unique_ptr<content::FileSelectListener, std::__1::default_delete<content::FileSelectListener> >, blink::mojom::FileChooserParams const&) + 212
16  libcontent.dylib                    0x000000011b43801c content::WebContentsImpl::RunFileChooser(content::RenderFrameHost*, std::__1::unique_ptr<content::FileSelectListener, std::__1::default_delete<content::FileSelectListener> >, blink::mojom::FileChooserParams const&) + 156
17  libcontent.dylib                    0x000000011a909e37 content::FileChooserImpl::OpenFileChooser(mojo::StructPtr<blink::mojom::FileChooserParams>, base::OnceCallback<void (mojo::StructPtr<blink::mojom::FileChooserResult>)>) + 471```
atom/common/promise_util.h
public:
  explicit CopyablePromise(const Promise& promise);
  CopyablePromise(const CopyablePromise&);
  ~CopyablePromise();
  template <typename T>
  static void ResolveCopyablePromise(const CopyablePromise& promise, T result) {
    if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
      base::PostTaskWithTraits(
          FROM_HERE, {content::BrowserThread::UI},
          base::BindOnce(Promise::ResolvePromise<T>, promise.GetPromise(),
                         std::move(result)));
    } else {
      promise.GetPromise().Resolve(result);
    }
  }
  static void ResolveEmptyCopyablePromise(const CopyablePromise& promise) {
    if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
      base::PostTaskWithTraits(
          FROM_HERE, {content::BrowserThread::UI},
          base::BindOnce(Promise::ResolveEmptyPromise, promise.GetPromise()));
    } else {
      promise.GetPromise().Resolve();
    }
  }
  static void RejectCopyablePromise(const CopyablePromise& promise,
                                    std::string errmsg) {
    if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
      base::PostTaskWithTraits(