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

Unified Diff: runtime/vm/debugger_api_impl.cc

Issue 9314053: Revert Dart_PropagateError until I can track down the problems in (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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 | « runtime/vm/debugger.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl.cc
===================================================================
--- runtime/vm/debugger_api_impl.cc (revision 3821)
+++ runtime/vm/debugger_api_impl.cc (working copy)
@@ -8,6 +8,7 @@
#include "vm/dart_api_state.h"
#include "vm/debugger.h"
#include "vm/isolate.h"
+#include "vm/longjump.h"
#include "vm/object_store.h"
namespace dart {
@@ -140,23 +141,25 @@
return Api::NewError(msg);
}
+ LongJump* base = isolate->long_jump_base();
+ LongJump jump;
+ isolate->set_long_jump_base(&jump);
Dart_Handle result = Api::True();
*breakpoint = NULL;
Debugger* debugger = isolate->debugger();
ASSERT(debugger != NULL);
- Error& error = Error::Handle();
- Breakpoint* bpt = debugger->SetBreakpointAtLine(script_url, line, &error);
- if (bpt == NULL) {
- if (!error.IsNull()) {
- // If SetBreakpointAtLine provided an error message, use it.
- result = Api::NewLocalHandle(error);
- } else {
+ if (setjmp(*jump.Set()) == 0) {
+ Breakpoint* bpt = debugger->SetBreakpointAtLine(script_url, line);
+ if (bpt == NULL) {
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);
}
} else {
- *breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt);
+ SetupErrorResult(&result);
}
+ isolate->set_long_jump_base(base);
return result;
}
@@ -195,21 +198,24 @@
function_name.ToCString());
}
+ LongJump* base = isolate->long_jump_base();
+ LongJump jump;
+ isolate->set_long_jump_base(&jump);
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);
- }
- if (bpt == NULL) {
- const char* target_name = Debugger::QualifiedFunctionName(bp_target);
- result = Api::NewError("%s: no breakpoint location found in '%s'",
+ 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'",
CURRENT_FUNC, target_name);
+ } else {
+ *breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt);
+ }
} else {
- *breakpoint = reinterpret_cast<Dart_Breakpoint>(bpt);
+ SetupErrorResult(&result);
}
+ isolate->set_long_jump_base(base);
return result;
}
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/exceptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698