if (env == NULL)
return; // Still starting up.
+ // Assign environment to the debugger's context
+ env->AssignToContext(v8::Debug::GetDebugContext());
+
Context::Scope context_scope(env->context());
Local<Object> message = Object::New(env->isolate());
message->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "cmd"),
Locker locker(node_isolate);
Environment* env =
CreateEnvironment(node_isolate, argc, argv, exec_argc, exec_argv);
+ // Assign env to the debugger's context
+ if (debugger_running) {
+ HandleScope scope(env->isolate());
+ env->AssignToContext(v8::Debug::GetDebugContext());
+ }
// This Context::Scope is here so EnableDebug() can look up the current
// environment with Environment::GetCurrentChecked().
// TODO(bnoordhuis) Reorder the debugger initialization logic so it can
/\d/, /\d/, /\d/, /\d/, /\d/
]);
-addTest('quit', []);
+// REPL and process.env regression
+addTest('repl', [
+ /Ctrl/
+]);
+
+addTest('for (var i in process.env) delete process.env[i]', []);
+
+addTest('process.env', [
+ /\{\}/
+]);