fix: missing HandleScope in WebDialogHelper (#22843)

This commit is contained in:
Shelley Vohr 2020-03-26 20:37:28 -07:00 committed by GitHub
parent ac501e8194
commit bd5789a12c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,7 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
void ShowOpenDialog(const file_dialog::DialogSettings& settings) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
gin_helper::Promise<gin_helper::Dictionary> promise(isolate);
auto callback = base::BindOnce(&FileSelectHelper::OnOpenDialogDone, this);
@ -68,6 +69,7 @@ class FileSelectHelper : public base::RefCounted<FileSelectHelper>,
void ShowSaveDialog(const file_dialog::DialogSettings& settings) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
gin_helper::Promise<gin_helper::Dictionary> promise(isolate);
auto callback = base::BindOnce(&FileSelectHelper::OnSaveDialogDone, this);