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

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: Comments 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
« no previous file with comments | « runtime/vm/stub_code.cc ('k') | runtime/vm/virtual_memory_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..16aa8348d264d60acadd6577b117ed48c89cfad7 100644
--- a/runtime/vm/virtual_memory_android.cc
+++ b/runtime/vm/virtual_memory_android.cc
@@ -13,6 +13,8 @@
#include "platform/assert.h"
#include "platform/utils.h"
+#include "vm/isolate.h"
+
namespace dart {
// standard MAP_FAILED causes "error: use of old-style cast" as it
@@ -80,6 +82,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());
« no previous file with comments | « runtime/vm/stub_code.cc ('k') | runtime/vm/virtual_memory_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698