### Preflight Checklist
* [x] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/master/CONTRIBUTING.md) for this project.
* [x] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/master/CODE_OF_CONDUCT.md) that this project adheres to.
* [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

### Issue Details

* **Electron Version:**
  * v11.2.3 (Chromium v87.0.4280.141, Node v12.18.3, v8 v8.7.220.31-electron.0)
* **Operating System:**
  * Linux
* **Last Known Working Electron version:**
  * unknown

### Expected Behavior
A call to `dialog.showOpenDialog({defaultPath: "."});` shows a file picker dialog.

### Actual Behavior
Electron crashes with the following message:
```
[8880:0220/194105.782938:FATAL:thread_restrictions.cc(78)] Check failed: !g_blocking_disallowed.Get().Get(). Function marked as blocking was called from a scope that disallows blocking! If this task is running inside the ThreadPool, it needs to have MayBlock() in its TaskTraits. Otherwise, consider making this blocking work asynchronous or, as a last resort, you may use ScopedAllowBlocking (see its documentation for best practices).
g_blocking_disallowed currently set to true by
```

Backtrace from gdb:
```
#0  __restore_sigs (set=set@entry=0x7fffffff8920) at ./arch/x86_64/syscall_arch.h:40
#1  0x00007ffff7fad50d in raise (sig=sig@entry=6) at src/signal/raise.c:11
#2  0x00007ffff7f83f25 in abort () at src/exit/abort.c:11
#3  0x000055555a60d345 in base::debug::BreakDebugger() () at ../../base/debug/debugger_posix.cc:344
#4  0x000055555a57145e in logging::LogMessage::~LogMessage() (this=0x7fffe3150500)
    at ../../base/logging.cc:879
#5  0x000055555a57180e in logging::LogMessage::~LogMessage() (this=0x7fffe3150500)
    at ../../base/logging.cc:554
#6  0x000055555a5fb602 in base::internal::AssertBlockingAllowed() ()
    at ../../base/threading/thread_restrictions.cc:78
#7  0x000055555a5f38ac in base::ScopedBlockingCall::ScopedBlockingCall(base::Location const&, base::BlockingType) (this=<optimized out>, from_here=..., blocking_type=<optimized out>)
    at ../../base/threading/scoped_blocking_call.cc:44
#8  0x000055555a61534e in base::DirectoryExists(base::FilePath const&) (path=...)
    at ../../base/files/file_util_posix.cc:488
#9  0x0000555556429185 in file_dialog::(anonymous namespace)::FileChooserDialog::FileChooserDialog(GtkFileChooserAction, file_dialog::DialogSettings const&)
    (this=0x7fffe2055e90, action=<optimized out>, settings=...)
    at ../../electron/shell/browser/ui/file_dialog_gtk.cc:78
#10 0x0000555556429565 in file_dialog::ShowOpenDialog(file_dialog::DialogSettings const&, gin_helper::Promise<gin_helper::Dictionary>) (settings=..., promise=...)
    at ../../electron/shell/browser/ui/file_dialog_gtk.cc:310
#11 0x000055555629f71c in (anonymous namespace)::ShowOpenDialog(file_dialog::DialogSettings const&, gin::Arguments*) (settings=..., args=<optimized out>) at ../../electron/shell/browser/api/electron_api_dialog.cc:66
#12 0x00005555562a1c8b in base::RepeatingCallback<v8::Local<v8::Promise> (file_dialog::DialogSettings const&, gin::Arguments*)>::Run(file_dialog::DialogSettings const&, gin::Arguments*) const &
    (this=0x7fffffff9250, args=..., args=0x7fffffff9260) at ../../base/callback.h:135
#13 gin_helper::Invoker<gin_helper::IndicesHolder<0ul, 1ul>, file_dialog::DialogSettings const&, gin::Arguments*>::DispatchToCallback<v8::Local<v8::Promise> >(base::RepeatingCallback<v8::Local<v8::Promise> (file_dialog::DialogSettings const&, gin::Arguments*)>) (this=0x7fffffff9280, callback=...)
    at ../../electron/shell/common/gin_helper/function_template.h:220
#14 0x00005555562a1b2f in gin_helper::Dispatcher<v8::Local<v8::Promise> (file_dialog::DialogSettings const&, gin::Arguments*)>::DispatchToCallback(v8::FunctionCallbackInfo<v8::Value> const&) (info=<optimized out>)
    at ../../electron/shell/common/gin_helper/function_template.h:262
#15 0x00005555578d1c81 in v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo)
    (this=0x7fffffff94d8, handler=...) at ../../v8/src/api/api-arguments-inl.h:158
#16 0x00005555578d043c in v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments)
    (isolate=<optimized out>, function=..., new_target=..., fun_data=..., receiver=..., args=...)
    at ../../v8/src/builtins/builtins-api.cc:111
#17 0x00005555578ce66e in v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) (args=..., isolate=0x3eca00000000) at ../../v8/src/builtins/builtins-api.cc:141
#18 0x00005555578ce11b in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*)
    (args_length=6, args_object=0x7fffffff96b0, isolate=0x3eca00000000)
    at ../../v8/src/builtins/builtins-api.cc:129
#19 0x0000555558b2e1bf in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit ()
#20 0x00005555588971d8 in Builtins_InterpreterEntryTrampoline ()
```

### To Reproduce
I've compiled Electron 11.2.3 from source and reduced the crash to [this minimal example in a gist](https://gist.github.com/mkaesberger/107ca937bdf4cc94ac01a1f4605e7985). I execute the example with `electron index.js`. The crash only occurs when `defaultPath` parameter is passed _and_ a `BrowserWindow` exists. Especially if no `BrowserWindow` was created then the dialog opens and does not crash Electron.


shell/browser/ui/file_dialog_gtk.cc
} else if (open_promise_) {
    gin_helper::Dictionary dict =
        gin::Dictionary::CreateEmpty(open_promise_->isolate());
    if (response == GTK_RESPONSE_ACCEPT) {
      dict.Set("canceled", false);
      dict.Set("filePaths", GetFileNames());
    } else {
      dict.Set("canceled", true);
      dict.Set("filePaths", std::vector<base::FilePath>());
    }
    open_promise_->Resolve(dict);
  }
  delete this;
}
void FileChooserDialog::AddFilters(const Filters& filters) {
  for (const auto& filter : filters) {
    GtkFileFilter* gtk_filter = gtk_file_filter_new();
    for (const auto& extension : filter.second) {
      
      std::string file_extension = base::ToLowerASCII("*." + extension);
      gtk_file_filter_add_pattern(gtk_filter, file_extension.c_str());
      
      file_extension = base::ToUpperASCII("*." + extension);
      gtk_file_filter_add_pattern(gtk_filter, file_extension.c_str());
    }
    gtk_file_filter_set_name(gtk_filter, filter.first.c_str());
    gtk_file_chooser_add_filter(dialog_, gtk_filter);
  }
}
void FileChooserDialog::OnUpdatePreview(GtkFileChooser* chooser) {