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

Unified Diff: runtime/vm/isolate.cc

Issue 1880233002: Address Siva's comments from https://codereview.chromium.org/1877973002/ (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Adjust assert: Protect may be called while mutator_thread does not exist" Created 4 years, 8 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 | « runtime/vm/isolate.h ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index de02503018ce67f397d45639c8f16871a46e3eb0..51e0c7effaac52f67b5a6880e7d6a2d8acc6c56c 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1527,7 +1527,7 @@ void Isolate::LowLevelShutdown() {
void Isolate::StopBackgroundCompiler() {
// Wait until all background compilation has finished.
if (background_compiler_ != NULL) {
- BackgroundCompiler::Stop(background_compiler_);
+ BackgroundCompiler::Stop(this);
}
}
@@ -1905,8 +1905,10 @@ void Isolate::AddDisablingField(const Field& field) {
RawField* Isolate::GetDisablingField() {
- ASSERT(Compiler::IsBackgroundCompilation());
- MutexLocker ml(field_list_mutex_);
+ ASSERT(Compiler::IsBackgroundCompilation() &&
+ (!Isolate::Current()->HasMutatorThread() ||
+ Isolate::Current()->mutator_thread()->IsAtSafepoint()));
+ ASSERT(Thread::Current()->IsAtSafepoint());
if (disabling_field_list_ == GrowableObjectArray::null()) {
return Field::null();
}
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/virtual_memory_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698