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

Unified Diff: src/api.cc

Issue 8909: Added some missing initialization checks to the debugger API.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 months 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 | « no previous file | test/cctest/test-debug.cc » ('j') | test/cctest/test-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
===================================================================
--- src/api.cc (revision 636)
+++ src/api.cc (working copy)
@@ -2800,8 +2800,8 @@
bool Debug::AddDebugEventListener(DebugEventCallback that, Handle<Value> data) {
- EnsureInitialized("v8::V8::AddDebugEventListener()");
- ON_BAILOUT("v8::V8::AddDebugEventListener()", return false);
+ EnsureInitialized("v8::Debug::AddDebugEventListener()");
+ ON_BAILOUT("v8::Debug::AddDebugEventListener()", return false);
HandleScope scope;
NeanderArray listeners(i::Factory::debug_event_listeners());
NeanderObject obj(2);
@@ -2817,7 +2817,7 @@
bool Debug::AddDebugEventListener(v8::Handle<v8::Function> that,
Handle<Value> data) {
- ON_BAILOUT("v8::V8::AddDebugEventListener()", return false);
+ ON_BAILOUT("v8::Debug::AddDebugEventListener()", return false);
HandleScope scope;
NeanderArray listeners(i::Factory::debug_event_listeners());
NeanderObject obj(2);
@@ -2832,8 +2832,8 @@
void Debug::RemoveDebugEventListener(DebugEventCallback that) {
- EnsureInitialized("v8::V8::RemoveDebugEventListener()");
- ON_BAILOUT("v8::V8::RemoveDebugEventListener()", return);
+ EnsureInitialized("v8::Debug::RemoveDebugEventListener()");
+ ON_BAILOUT("v8::Debug::RemoveDebugEventListener()", return);
HandleScope scope;
NeanderArray listeners(i::Factory::debug_event_listeners());
for (int i = 0; i < listeners.length(); i++) {
@@ -2853,7 +2853,7 @@
void Debug::RemoveDebugEventListener(v8::Handle<v8::Function> that) {
- ON_BAILOUT("v8::V8::RemoveDebugEventListener()", return);
+ ON_BAILOUT("v8::Debug::RemoveDebugEventListener()", return);
HandleScope scope;
NeanderArray listeners(i::Factory::debug_event_listeners());
for (int i = 0; i < listeners.length(); i++) {
@@ -2875,16 +2875,19 @@
void Debug::DebugBreak() {
+ if (!i::V8::HasBeenSetup()) return;
i::StackGuard::DebugBreak();
}
void Debug::SetMessageHandler(v8::DebugMessageHandler handler, void* data) {
+ EnsureInitialized("v8::Debug::SetMessageHandler");
i::Debugger::SetMessageHandler(handler, data);
}
void Debug::SendCommand(const uint16_t* command, int length) {
+ if (!i::V8::HasBeenSetup()) return;
Kasper Lund 2008/10/30 10:09:34 Does the command sender expect an answer? If so, t
Søren Thygesen Gjesse 2008/10/30 10:27:02 All command responses are send through a callback
i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length));
}
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698