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 9a6012edd9330296b7476bc6b7fbda2cd5c8165d.

Conflicts:

	src/node.cc
This commit is contained in:
Bert Belder 2012-03-30 21:50:15 +02:00
parent 7c02b5a58d
commit 407181538b

View File

@ -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