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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 9581013: Splitting debugger breakpoints into two parts (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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
Index: runtime/vm/debugger_api_impl.cc
===================================================================
--- runtime/vm/debugger_api_impl.cc (revision 4881)
+++ runtime/vm/debugger_api_impl.cc (working copy)
@@ -144,16 +144,11 @@
*breakpoint = NULL;
Debugger* debugger = isolate->debugger();
ASSERT(debugger != NULL);
- Error& error = Error::Handle();
- Breakpoint* bpt = debugger->SetBreakpointAtLine(script_url, line, &error);
+ SourceBreakpoint* bpt =
+ debugger->SetBreakpointAtLine(script_url, line);
if (bpt == NULL) {
- if (!error.IsNull()) {
- // If SetBreakpointAtLine provided an error message, use it.
- result = Api::NewLocalHandle(error);
- } else {
- result = Api::NewError("%s: could not set breakpoint at line %d of '%s'",
+ result = Api::NewError("%s: could not set breakpoint at line %d of '%s'",
CURRENT_FUNC, line, script_url.ToCString());
- }
} else {
*breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt);
}
@@ -198,11 +193,7 @@
Dart_Handle result = Api::True();
*breakpoint = NULL;
- Error& error = Error::Handle();
- Breakpoint* bpt = debugger->SetBreakpointAtEntry(bp_target, &error);
- if (!error.IsNull()) {
- return Api::NewLocalHandle(error);
- }
+ SourceBreakpoint* bpt = debugger->SetBreakpointAtEntry(bp_target);
if (bpt == NULL) {
const char* target_name = Debugger::QualifiedFunctionName(bp_target);
result = Api::NewError("%s: no breakpoint location found in '%s'",
@@ -219,7 +210,7 @@
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
- CHECK_AND_CAST(Breakpoint, breakpoint, breakpoint_in);
+ CHECK_AND_CAST(SourceBreakpoint, breakpoint, breakpoint_in);
isolate->debugger()->RemoveBreakpoint(breakpoint);
return Api::True();
}
« runtime/vm/debugger.h ('K') | « runtime/vm/debugger.cc ('k') | runtime/vm/debugger_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698