Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: src/api.cc

Issue 503022: Add locker support to DebugMessageDispatchHandler (Closed)
Patch Set: make compilable with debugger support off Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/lineprocessor.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index ab5d0a5608e356ff79e2fdae76fe54234de042b2..f0fd09fc505e1aacd2eaa2b62d3374b821134cc3 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -54,6 +54,28 @@
namespace v8 {
+#ifdef ENABLE_DEBUGGER_SUPPORT
+
+void Debug::ProcessDebuggerCommands() {
+ HandleScope scope;
+
+ v8::internal::EnterDebugger debugger;
+
+ bool caught_exception;
+ v8::internal::Handle<v8::internal::Object> exec_state = v8::internal::Debugger::MakeExecutionState(&caught_exception);
+
+ // Replace v8::NewFunction with something.
+ i::Handle<i::Object> undef = i::Factory::undefined_value();
+ i::Handle<i::JSObject> event_data = i::Handle<i::JSObject>::cast(i::Debugger::MakeNewFunctionEvent(reinterpret_cast<i::Handle<i::Object>&>(undef), &caught_exception));
+ v8::internal::Debugger::NotifyMessageHandler(v8::NewFunction,
+ v8::internal::Handle<v8::internal::JSObject>::cast(exec_state),
+ event_data, true);
+}
+
+#endif
+
+
+
#define ON_BAILOUT(location, code) \
if (IsDeadCheck(location)) { \
@@ -3669,7 +3691,7 @@ void Debug::SetMessageHandler(v8::Debug::MessageHandler handler,
void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) {
EnsureInitialized("v8::Debug::SetMessageHandler");
ENTER_V8;
- HandleScope scope;
+ // rybin HandleScope scope;
i::Debugger::SetMessageHandler(handler);
}
« no previous file with comments | « samples/lineprocessor.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698