Index: runtime/vm/megamorphic_cache_table.cc |
diff --git a/runtime/vm/megamorphic_cache_table.cc b/runtime/vm/megamorphic_cache_table.cc |
index 6393c3fecedbd544d06613f56cf6e31ad0be44b9..7f4bbec580633f3a9a196fc47f5bb4ff5bf419eb 100644 |
--- a/runtime/vm/megamorphic_cache_table.cc |
+++ b/runtime/vm/megamorphic_cache_table.cc |
@@ -15,6 +15,8 @@ namespace dart { |
RawMegamorphicCache* MegamorphicCacheTable::Lookup(Isolate* isolate, |
const String& name, |
const Array& descriptor) { |
+ // Multiple compilation threads could access this lookup. |
+ MutexLocker ml(isolate->mutex()); |
ASSERT(name.IsSymbol()); |
// TODO(rmacnak): ASSERT(descriptor.IsCanonical()); |