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

Unified Diff: runtime/vm/object.cc

Issue 1401413002: Move no_callback_scope_depth_ and cha_ from isolate -> thread (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Spelling fix Created 5 years, 2 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/native_api_impl.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 269253aef321b781c93fbaef4c4483d02f72299e..6b4264b12231f0fa4e575757e107c4e653bbea6e 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -1826,7 +1826,9 @@ RawObject* Object::Allocate(intptr_t cls_id,
ASSERT(Utils::IsAligned(size, kObjectAlignment));
Thread* thread = Thread::Current();
Isolate* isolate = thread->isolate();
- ASSERT(isolate->no_callback_scope_depth() == 0);
+ // New space allocation allowed only in mutator thread (Dart thread);
+ ASSERT(isolate->MutatorThreadIsCurrentThread() || (space != Heap::kNew));
+ ASSERT(thread->no_callback_scope_depth() == 0);
Heap* heap = isolate->heap();
uword address = heap->Allocate(size, space);
« no previous file with comments | « runtime/vm/native_api_impl.cc ('k') | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698