From aa69879d42af5c10e77199d1e997894b5e74f9f6 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Wed, 13 Jan 2016 17:08:57 +0900 Subject: [PATCH] [node-xwalk] Use node::MakeCallback() in PostMessageToJSCallback() Change-Id: Ide1f1acf5fc1615c3996635e675e0676dbdc5121 node::MakeCallback() calls KickNextTick() of node::Environment. --- modules/node-xwalk/src/native_binding.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/node-xwalk/src/native_binding.cc b/modules/node-xwalk/src/native_binding.cc index 5dfce3d..a11253e 100755 --- a/modules/node-xwalk/src/native_binding.cc +++ b/modules/node-xwalk/src/native_binding.cc @@ -259,7 +259,8 @@ void NativeBinding::PostMessageToJSCallback( v8::Local func = v8::Local::New(isolate, listener->second); - func->Call(v8::Null(isolate), 1, args); + auto context = isolate->GetCurrentContext(); + node::MakeCallback(isolate, context->Global(), func, 1, args); } } // namespace extensions -- 2.7.4