Chromium Code Reviews

Unified Diff: src/d8.cc

Issue 77035: Add ENABLE_DEBUGGER_SUPPORT macro.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/d8.h ('k') | src/debug.h » ('j') | src/serialize.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/d8.h ('k') | src/debug.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine