Index: runtime/vm/weak_code.cc |
diff --git a/runtime/vm/weak_code.cc b/runtime/vm/weak_code.cc |
index 7f2f4064ff37f551baba76af68badef9dae5b39a..a13c9ab1c9ba4cf8cdc569fe11348b0a2a44de60 100644 |
--- a/runtime/vm/weak_code.cc |
+++ b/runtime/vm/weak_code.cc |
@@ -63,10 +63,14 @@ bool WeakCodeReferences::IsOptimizedCode(const Array& dependent_code, |
void WeakCodeReferences::DisableCode() { |
Thread* thread = Thread::Current(); |
const Array& code_objects = Array::Handle(thread->zone(), array_.raw()); |
+#if defined(DART_PRECOMPILED_RUNTIME) |
+ ASSERT(code_objects.IsNull()); |
+ return; |
+#else |
if (code_objects.IsNull()) { |
return; |
} |
- ASSERT(!FLAG_precompiled_runtime); |
+ |
UpdateArrayTo(Object::null_array()); |
// Disable all code on stack. |
Code& code = Code::Handle(); |
@@ -132,6 +136,7 @@ void WeakCodeReferences::DisableCode() { |
} |
} |
} |
+#endif // defined(DART_PRECOMPILED_RUNTIME) |
} |
} // namespace dart |