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

Unified Diff: runtime/vm/debugger.cc

Issue 1127653003: Do not swallow compilation errors when setting breakpoint (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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/compiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 45505)
+++ runtime/vm/debugger.cc (working copy)
@@ -1638,6 +1638,7 @@
GrowableObjectArray& closures = GrowableObjectArray::Handle(isolate_);
Function& function = Function::Handle(isolate_);
Function& best_fit = Function::Handle(isolate_);
+ Error& error = Error::Handle(isolate_);
const ClassTable& class_table = *isolate_->class_table();
const intptr_t num_classes = class_table.NumCids();
@@ -1654,7 +1655,14 @@
continue;
}
// Parse class definition if not done yet.
- cls.EnsureIsFinalized(isolate_);
+ error = cls.EnsureIsFinalized(isolate_);
+ if (!error.IsNull()) {
+ // Ignore functions in this class.
+ // TODO(hausner): Should we propagate this error? How?
+ // EnsureIsFinalized only returns an error object if there
+ // is no longjump base on the stack.
+ continue;
+ }
functions = cls.functions();
if (!functions.IsNull()) {
const intptr_t num_functions = functions.Length();
@@ -1781,11 +1789,16 @@
RawError* Debugger::OneTimeBreakAtEntry(const Function& target_function) {
- SourceBreakpoint* bpt = SetBreakpointAtEntry(target_function);
- if (bpt != NULL) {
- bpt->SetIsOneShot();
+ LongJumpScope jump;
+ if (setjmp(*jump.Set()) == 0) {
+ SourceBreakpoint* bpt = SetBreakpointAtEntry(target_function);
+ if (bpt != NULL) {
+ bpt->SetIsOneShot();
+ }
+ return Error::null();
+ } else {
+ return isolate_->object_store()->sticky_error();
}
- return Error::null();
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698