Adapt to changes of Chrome 51 API changes (Part 2)

This commit is contained in:
Cheng Zhao 2016-05-23 12:28:59 +09:00
parent 7ba391da7c
commit a2bd55dd3c
48 changed files with 131 additions and 131 deletions

View file

@ -7,7 +7,6 @@
#include "atom/common/api/locker.h"
#include "atom/common/node_includes.h"
#include "base/memory/scoped_ptr.h"
#include "third_party/WebKit/public/web/WebScopedMicrotaskSuppression.h"
namespace mate {
@ -17,9 +16,11 @@ v8::Local<v8::Value> CallEmitWithArgs(v8::Isolate* isolate,
v8::Local<v8::Object> obj,
ValueVector* args) {
// Perform microtask checkpoint after running JavaScript.
std::unique_ptr<blink::WebScopedRunV8Script> script_scope(
std::unique_ptr<v8::MicrotasksScope> script_scope(
Locker::IsBrowserProcess() ?
nullptr : new blink::WebScopedRunV8Script);
nullptr :
new v8::MicrotasksScope(isolate,
v8::MicrotasksScope::kRunMicrotasks));
// Use node::MakeCallback to call the callback, and it will also run pending
// tasks in Node.js.
return node::MakeCallback(