Browse Source

Revert "Re-add top-level v8::Locker"

The locker makes node crash in debug mode sometimes.
For example, test/simple/test-repl.js triggers it.

This reverts commit 9a6012edd9.

Conflicts:

	src/node.cc
v0.9.1-release
Bert Belder 13 years ago
parent
commit
407181538b
  1. 16
      src/node.cc

16
src/node.cc

@ -2759,15 +2759,12 @@ int Start(int argc, char *argv[]) {
// Use copy here as to not modify the original argv:
Init(argc, argv_copy);
V8::Initialize();
Persistent<Context> context;
{
Locker locker;
HandleScope handle_scope;
v8::V8::Initialize();
v8::HandleScope handle_scope;
// Create the one and only Context.
Persistent<Context> context = Context::New();
Context::Scope context_scope(context);
Persistent<v8::Context> context = v8::Context::New();
v8::Context::Scope context_scope(context);
// Use original argv, as we're just copying values out of it.
Handle<Object> process_l = SetupProcessObject(argc, argv);
@ -2785,13 +2782,10 @@ int Start(int argc, char *argv[]) {
uv_run(uv_default_loop());
EmitExit(process_l);
#ifndef NDEBUG
context.Dispose();
#endif
}
#ifndef NDEBUG
// Clean up.
context.Dispose();
V8::Dispose();
#endif // NDEBUG

Loading…
Cancel
Save