Fix crash when calling dialog's callback.

This commit is contained in:
Cheng Zhao 2014-01-14 14:18:32 +08:00
parent 2a129f892f
commit 931182b677

View file

@ -19,6 +19,7 @@ namespace {
template<typename T>
void CallV8Function(const RefCountedV8Function& callback, T arg) {
v8::HandleScope handle_scope(node_isolate);
v8::Handle<v8::Value> value = ToV8Value(arg);
callback->NewHandle(node_isolate)->Call(
v8::Context::GetCurrent()->Global(), 1, &value);