Make the node environment constrained in browser_main_parts.
This commit is contained in:
parent
1d359cb8aa
commit
6a891be0e4
6 changed files with 24 additions and 21 deletions
|
@ -6,6 +6,7 @@
|
|||
#define ATOM_BROWSER_ATOM_BROWSER_MAIN_PARTS_H_
|
||||
|
||||
#include "brightray/browser/browser_main_parts.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
namespace atom {
|
||||
|
||||
|
@ -40,6 +41,13 @@ class AtomBrowserMainParts : public brightray::BrowserMainParts {
|
|||
scoped_ptr<Browser> browser_;
|
||||
scoped_ptr<NodeBindings> node_bindings_;
|
||||
|
||||
// The V8 environment of browser process.
|
||||
v8::Isolate* isolate_;
|
||||
v8::Locker locker_;
|
||||
v8::HandleScope handle_scope_;
|
||||
v8::UniquePersistent<v8::Context> context_;
|
||||
v8::Context::Scope context_scope_;
|
||||
|
||||
static AtomBrowserMainParts* self_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomBrowserMainParts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue