node: un-revert 9a6012e
The crashes in debug mode after adding Locker are *not* caused by Locker. Locker is merely exposing issues that already existed. Some of these issues have since been fixed in 70635753. This reverts commit 407181538b5193f6810bf06a2056a200265c0e93. This reapplies commit 9a6012edd9330296b7476bc6b7fbda2cd5c8165d. Conflicts: src/node.cc
This commit is contained in:
parent
ebbd4039bc
commit
c33d3174b8
16
src/node.cc
16
src/node.cc
@ -2858,12 +2858,14 @@ int Start(int argc, char *argv[]) {
|
|||||||
// Use copy here as to not modify the original argv:
|
// Use copy here as to not modify the original argv:
|
||||||
Init(argc, argv_copy);
|
Init(argc, argv_copy);
|
||||||
|
|
||||||
v8::V8::Initialize();
|
V8::Initialize();
|
||||||
v8::HandleScope handle_scope;
|
{
|
||||||
|
Locker locker;
|
||||||
|
HandleScope handle_scope;
|
||||||
|
|
||||||
// Create the one and only Context.
|
// Create the one and only Context.
|
||||||
Persistent<v8::Context> context = v8::Context::New();
|
Persistent<Context> context = Context::New();
|
||||||
v8::Context::Scope context_scope(context);
|
Context::Scope context_scope(context);
|
||||||
|
|
||||||
// Use original argv, as we're just copying values out of it.
|
// Use original argv, as we're just copying values out of it.
|
||||||
Handle<Object> process_l = SetupProcessObject(argc, argv);
|
Handle<Object> process_l = SetupProcessObject(argc, argv);
|
||||||
@ -2884,8 +2886,12 @@ int Start(int argc, char *argv[]) {
|
|||||||
RunAtExit();
|
RunAtExit();
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
// Clean up.
|
|
||||||
context.Dispose();
|
context.Dispose();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
// Clean up. Not strictly necessary.
|
||||||
V8::Dispose();
|
V8::Dispose();
|
||||||
#endif // NDEBUG
|
#endif // NDEBUG
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user