From: Cheng Zhao Date: Tue, 14 Jan 2014 06:18:32 +0000 (+0800) Subject: Fix crash when calling dialog's callback. X-Git-Tag: v0.8.5~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=931182b677e81c4bf6922193478af861193d952c;p=electron.git Fix crash when calling dialog's callback. --- diff --git a/browser/api/atom_api_dialog.cc b/browser/api/atom_api_dialog.cc index a0b9fcf2..f42eb1b6 100644 --- a/browser/api/atom_api_dialog.cc +++ b/browser/api/atom_api_dialog.cc @@ -19,6 +19,7 @@ namespace { template void CallV8Function(const RefCountedV8Function& callback, T arg) { + v8::HandleScope handle_scope(node_isolate); v8::Handle value = ToV8Value(arg); callback->NewHandle(node_isolate)->Call( v8::Context::GetCurrent()->Global(), 1, &value);