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

Unified Diff: runtime/vm/compiler.cc

Issue 2006793002: VM: Fix race between background compiler and guarded cid update. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | runtime/vm/jit_optimizer.cc » ('j') | runtime/vm/object.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 6fc4834dd1ef15ebe67c313fe65f67496976d213..e82d954f089869f983d91571f8b53bf425647c8c 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -496,8 +496,9 @@ static bool CheckDisablingFields(
Zone* zone = thread->zone();
Field& field = Field::Handle(zone, isolate->GetDisablingField());
while (!field.IsNull()) {
+ ASSERT(field.IsOriginal());
for (intptr_t i = 0; i < guarded_fields.length(); i++) {
- if (guarded_fields.At(i)->raw() == field.raw()) {
+ if (guarded_fields.At(i)->Original() == field.raw()) {
return true;
}
}
@@ -646,9 +647,10 @@ NOT_IN_PRODUCT(
const ZoneGrowableArray<const Field*>& guarded_fields =
*flow_graph->parsed_function().guarded_fields();
+ Field& field = Field::Handle();
for (intptr_t i = 0; i < guarded_fields.length(); i++) {
- const Field* field = guarded_fields[i];
- field->RegisterDependentCode(code);
+ field = guarded_fields[i]->Original();
+ field.RegisterDependentCode(code);
}
}
} else { // not optimized.
« no previous file with comments | « no previous file | runtime/vm/jit_optimizer.cc » ('j') | runtime/vm/object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698