Index: src/d8.cc |
=================================================================== |
--- src/d8.cc (revision 1738) |
+++ src/d8.cc (working copy) |
@@ -246,6 +246,7 @@ |
} |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
Handle<Object> Shell::DebugMessageDetails(Handle<String> message) { |
Context::Scope context_scope(utility_context_); |
Handle<Object> global = utility_context_->Global(); |
@@ -266,6 +267,7 @@ |
Handle<Value> val = Handle<Function>::Cast(fun)->Call(global, kArgc, argv); |
return val; |
} |
+#endif |
int32_t* Counter::Bind(const char* name, bool is_histogram) { |
@@ -406,11 +408,13 @@ |
global_template->Set(String::New("arguments"), |
Utils::ToLocal(arguments_jsarray)); |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
// Install the debugger object in the utility scope |
i::Debug::Load(); |
i::JSObject* debug = i::Debug::debug_context()->global(); |
utility_context_->Global()->Set(String::New("$debug"), |
Utils::ToLocal(&debug)); |
+#endif |
// Run the d8 shell utility script in the utility context |
int source_index = i::NativesCollection<i::D8>::GetIndex("d8"); |
@@ -436,8 +440,10 @@ |
evaluation_context_ = Context::New(NULL, global_template); |
evaluation_context_->SetSecurityToken(Undefined()); |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
// Set the security token of the debug context to allow access. |
i::Debug::debug_context()->set_security_token(i::Heap::undefined_value()); |
+#endif |
} |
@@ -690,6 +696,7 @@ |
Locker::StartPreemption(preemption_interval); |
} |
+#ifdef ENABLE_DEBUGGER_SUPPORT |
// Run the remote debugger if requested. |
if (i::FLAG_remote_debugger) { |
RunRemoteDebugger(i::FLAG_debugger_port); |
@@ -705,6 +712,7 @@ |
if (i::FLAG_debugger && !i::FLAG_debugger_agent) { |
v8::Debug::SetDebugEventListener(HandleDebugEvent); |
} |
+#endif |
} |
if (run_shell) |
RunShell(); |