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

Unified Diff: runtime/vm/object.cc

Issue 2631453004: Fix assertion failure in the background compiler. (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2da9eb62c4b0b5c7f5ef255576b59967b0fba013..5c0663fb65335bf02efe2f1c9ecbca0c2a2144e1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -5222,7 +5222,8 @@ bool Function::HasBreakpoint() const {
void Function::InstallOptimizedCode(const Code& code, bool is_osr) const {
DEBUG_ASSERT(IsMutatorOrAtSafepoint());
// We may not have previous code if FLAG_precompile is set.
- if (!is_osr && HasCode()) {
+ // Hot-reload may have already disabled the current code.
+ if (!is_osr && HasCode() && !Code::Handle(CurrentCode()).IsDisabled()) {
Code::Handle(CurrentCode()).DisableDartCode();
}
AttachCode(code);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698