Index: runtime/vm/debugger.cc |
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc |
index 0b614586061f31bab6b77c0fff21fa58e02ea47a..7c605e81d0e5fe3d97275f7f4a57f6b4b9414f33 100644 |
--- a/runtime/vm/debugger.cc |
+++ b/runtime/vm/debugger.cc |
@@ -1234,7 +1234,8 @@ RawObject* RemoteObjectCache::GetObj(intptr_t obj_id) const { |
Debugger::Debugger() |
- : isolate_(NULL), |
+ : thread_(NULL), |
+ isolate_(NULL), |
isolate_id_(ILLEGAL_ISOLATE_ID), |
initialized_(false), |
next_id_(1), |
@@ -1956,7 +1957,7 @@ RawFunction* Debugger::FindBestFit(const Script& script, |
continue; |
} |
// Parse class definition if not done yet. |
- error = cls.EnsureIsFinalized(isolate_); |
+ error = cls.EnsureIsFinalized(thread_); |
if (!error.IsNull()) { |
// Ignore functions in this class. |
// TODO(hausner): Should we propagate this error? How? |
@@ -2767,16 +2768,17 @@ void Debugger::BreakHere(const String& msg) { |
} |
-void Debugger::Initialize(Isolate* isolate) { |
+void Debugger::Initialize(Thread* thread) { |
if (initialized_) { |
return; |
} |
- isolate_ = isolate; |
+ thread_ = thread; |
+ isolate_ = thread->isolate(); |
// Use the isolate's control port as the isolate_id for debugging. |
// This port will be used as a unique ID to represent the isolate in the |
// debugger wire protocol messages. |
- isolate_id_ = isolate->main_port(); |
+ isolate_id_ = isolate_->main_port(); |
initialized_ = true; |
} |