Index: runtime/vm/debugger_api_impl.cc |
=================================================================== |
--- runtime/vm/debugger_api_impl.cc (revision 3415) |
+++ runtime/vm/debugger_api_impl.cc (working copy) |
@@ -8,7 +8,6 @@ |
#include "vm/dart_api_state.h" |
#include "vm/debugger.h" |
#include "vm/isolate.h" |
-#include "vm/longjump.h" |
namespace dart { |
@@ -141,24 +140,21 @@ |
function_name.ToCString()); |
} |
- LongJump* base = isolate->long_jump_base(); |
- LongJump jump; |
- isolate->set_long_jump_base(&jump); |
Dart_Handle result = Api::True(); |
*breakpoint = NULL; |
- if (setjmp(*jump.Set()) == 0) { |
- Breakpoint* 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'", |
+ |
+ Error& error = Error::Handle(); |
+ Breakpoint* bpt = debugger->SetBreakpointAtEntry(bp_target, &error); |
+ if (!error.IsNull()) { |
+ return Api::NewLocalHandle(error); |
+ } |
+ if (bpt == NULL) { |
+ const char* target_name = Debugger::QualifiedFunctionName(bp_target); |
+ result = Api::NewError("%s: no breakpoint location found in '%s'", |
CURRENT_FUNC, target_name); |
- } else { |
- *breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt); |
- } |
} else { |
- SetupErrorResult(&result); |
+ *breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt); |
} |
- isolate->set_long_jump_base(base); |
return result; |
} |