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

Unified Diff: runtime/vm/debugger.cc

Issue 1672853002: Move sticky_error_ from isolate to thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments addressed Created 4 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
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 423aef2a28f20842a73de81bb769b6b4b1c72970..82511db787418fe52421c7147296fead76518912 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -326,7 +326,7 @@ void Debugger::InvokeEventHandler(DebuggerEvent* event) {
if (ServiceNeedsDebuggerEvent(event->type()) && event->IsPauseEvent()) {
// If we were paused, notify the service that we have resumed.
const Error& error =
- Error::Handle(isolate_->object_store()->sticky_error());
+ Error::Handle(Thread::Current()->sticky_error());
ASSERT(error.IsNull() || error.IsUnwindError());
// Only send a resume event when the isolate is not unwinding.
@@ -367,10 +367,9 @@ RawError* Debugger::SignalIsolateInterrupted() {
}
// If any error occurred while in the debug message loop, return it here.
- const Error& error =
- Error::Handle(isolate_->object_store()->sticky_error());
+ const Error& error = Error::Handle(Thread::Current()->sticky_error());
ASSERT(error.IsNull() || error.IsUnwindError());
- isolate_->object_store()->clear_sticky_error();
+ Thread::Current()->clear_sticky_error();
return error.raw();
}
@@ -2131,7 +2130,7 @@ RawError* Debugger::OneTimeBreakAtEntry(const Function& target_function) {
SetBreakpointAtEntry(target_function, true);
return Error::null();
} else {
- return isolate_->object_store()->sticky_error();
+ return Thread::Current()->sticky_error();
}
}
@@ -2325,7 +2324,7 @@ RawObject* Debugger::GetInstanceField(const Class& cls,
args.SetAt(0, object);
result = DartEntry::InvokeFunction(getter_func, args);
} else {
- result = isolate_->object_store()->sticky_error();
+ result = Thread::Current()->sticky_error();
}
ignore_breakpoints_ = saved_ignore_flag;
return result.raw();
@@ -2359,7 +2358,7 @@ RawObject* Debugger::GetStaticField(const Class& cls,
if (setjmp(*jump.Set()) == 0) {
result = DartEntry::InvokeFunction(getter_func, Object::empty_array());
} else {
- result = isolate_->object_store()->sticky_error();
+ result = Thread::Current()->sticky_error();
}
ignore_breakpoints_ = saved_ignore_flag;
return result.raw();
@@ -2697,9 +2696,8 @@ RawError* Debugger::DebuggerStepCallback() {
stack_trace_ = NULL;
// If any error occurred while in the debug message loop, return it here.
- const Error& error =
- Error::Handle(isolate_->object_store()->sticky_error());
- isolate_->object_store()->clear_sticky_error();
+ const Error& error = Error::Handle(Thread::Current()->sticky_error());
+ Thread::Current()->clear_sticky_error();
return error.raw();
}
@@ -2788,9 +2786,8 @@ RawError* Debugger::SignalBpReached() {
}
// If any error occurred while in the debug message loop, return it here.
- const Error& error =
- Error::Handle(isolate_->object_store()->sticky_error());
- isolate_->object_store()->clear_sticky_error();
+ const Error& error = Error::Handle(Thread::Current()->sticky_error());
+ Thread::Current()->clear_sticky_error();
return error.raw();
}
« no previous file with comments | « runtime/vm/dart_api_impl.cc ('k') | runtime/vm/flow_graph_inliner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698