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

Unified Diff: runtime/vm/virtual_memory_android.cc

Issue 1710443003: Fix background compilation: allocate stubs at safepoint (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: d Created 4 years, 10 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
Index: runtime/vm/virtual_memory_android.cc
diff --git a/runtime/vm/virtual_memory_android.cc b/runtime/vm/virtual_memory_android.cc
index 0e0c1b23380041e6e9bedcccc65dad76089f3ed0..60d665a5a902f65604e672f2581fc067d191345c 100644
--- a/runtime/vm/virtual_memory_android.cc
+++ b/runtime/vm/virtual_memory_android.cc
@@ -80,6 +80,8 @@ bool VirtualMemory::Commit(uword addr, intptr_t size, bool executable) {
bool VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
+ ASSERT(Thread::Current()->IsMutatorThread() ||
+ Isolate::Current()->mutator_thread()->IsAtSafepoint());
uword start_address = reinterpret_cast<uword>(address);
uword end_address = start_address + size;
uword page_address = Utils::RoundDown(start_address, PageSize());

Powered by Google App Engine
This is Rietveld 408576698