Index: runtime/vm/weak_code.cc |
diff --git a/runtime/vm/weak_code.cc b/runtime/vm/weak_code.cc |
index 544082644ef1cd6fabf049b05efd806ece516b9a..7f2f4064ff37f551baba76af68badef9dae5b39a 100644 |
--- a/runtime/vm/weak_code.cc |
+++ b/runtime/vm/weak_code.cc |
@@ -61,7 +61,8 @@ bool WeakCodeReferences::IsOptimizedCode(const Array& dependent_code, |
void WeakCodeReferences::DisableCode() { |
- const Array& code_objects = Array::Handle(array_.raw()); |
+ Thread* thread = Thread::Current(); |
+ const Array& code_objects = Array::Handle(thread->zone(), array_.raw()); |
if (code_objects.IsNull()) { |
return; |
} |
@@ -70,7 +71,8 @@ void WeakCodeReferences::DisableCode() { |
// Disable all code on stack. |
Code& code = Code::Handle(); |
{ |
- DartFrameIterator iterator; |
+ DartFrameIterator iterator(thread, |
+ StackFrameIterator::kNoCrossThreadIteration); |
StackFrame* frame = iterator.NextFrame(); |
while (frame != NULL) { |
code = frame->LookupDartCode(); |