Use WebScopedRunV8Script in converted C++ functions

This commit is contained in:
Cheng Zhao 2015-08-07 19:34:00 +08:00
parent 5c18d89453
commit 1bb0dde360
12 changed files with 85 additions and 25 deletions

17
atom/common/api/locker.cc Normal file
View file

@ -0,0 +1,17 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE.chromium file.
#include "atom/common/api/locker.h"
namespace mate {
Locker::Locker(v8::Isolate* isolate) {
if (IsBrowserProcess())
locker_.reset(new v8::Locker(isolate));
}
Locker::~Locker() {
}
} // namespace mate