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

Unified Diff: runtime/vm/debugger.cc

Issue 2411153002: Make reloadSources service RPC public (Closed)
Patch Set: turnidge review Created 4 years, 2 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.h ('k') | runtime/vm/isolate.h » ('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 51c6721d9edeccb9de890220ece86563f642d5dc..16bb50f3ad6098f129118f482f0aebba5e0b4d1f 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -292,12 +292,22 @@ void Debugger::InvokeEventHandler(ServiceEvent* event) {
RawError* Debugger::PauseInterrupted() {
+ return PauseRequest(ServiceEvent::kPauseInterrupted);
+}
+
+
+RawError* Debugger::PausePostRequest() {
+ return PauseRequest(ServiceEvent::kPausePostRequest);
+}
+
+
+RawError* Debugger::PauseRequest(ServiceEvent::EventKind kind) {
if (ignore_breakpoints_ || IsPaused()) {
// We don't let the isolate get interrupted if we are already
// paused or ignoring breakpoints.
return Error::null();
}
- ServiceEvent event(isolate_, ServiceEvent::kPauseInterrupted);
+ ServiceEvent event(isolate_, kind);
DebuggerStackTrace* trace = CollectStackTrace();
if (trace->Length() > 0) {
event.set_top_frame(trace->FrameAt(0));
@@ -574,7 +584,8 @@ intptr_t ActivationFrame::ColumnNumber() {
void ActivationFrame::GetVarDescriptors() {
if (var_descriptors_.IsNull()) {
- if (code().is_optimized()) {
+ Code& unoptimized_code = Code::Handle(function().unoptimized_code());
+ if (unoptimized_code.IsNull()) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
const Error& error = Error::Handle(zone,
@@ -582,9 +593,10 @@ void ActivationFrame::GetVarDescriptors() {
if (!error.IsNull()) {
Exceptions::PropagateError(error);
}
+ unoptimized_code ^= function().unoptimized_code();
}
- var_descriptors_ =
- Code::Handle(function().unoptimized_code()).GetLocalVarDescriptors();
+ ASSERT(!unoptimized_code.IsNull());
+ var_descriptors_ = unoptimized_code.GetLocalVarDescriptors();
ASSERT(!var_descriptors_.IsNull());
}
}
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698