Enable converting v8::Function to base::Callback.
This commit is contained in:
parent
8f2b998718
commit
499c9bc3b9
5 changed files with 262 additions and 1 deletions
21
atom/common/browser_v8_locker.cc
Normal file
21
atom/common/browser_v8_locker.cc
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright (c) 2014 GitHub, Inc. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "atom/common/browser_v8_locker.h"
|
||||
|
||||
namespace node {
|
||||
extern bool g_standalone_mode;
|
||||
}
|
||||
|
||||
namespace atom {
|
||||
|
||||
BrowserV8Locker::BrowserV8Locker(v8::Isolate* isolate) {
|
||||
if (node::g_standalone_mode)
|
||||
locker_.reset(new v8::Locker(isolate));
|
||||
}
|
||||
|
||||
BrowserV8Locker::~BrowserV8Locker() {
|
||||
}
|
||||
|
||||
} // namespace atom
|
Loading…
Add table
Add a link
Reference in a new issue