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

Unified Diff: runtime/vm/heap.cc

Issue 1289153002: Add test of full GC on helper thread (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add comments, use Acquire method. Created 5 years, 4 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 | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/heap.cc
diff --git a/runtime/vm/heap.cc b/runtime/vm/heap.cc
index b95dc862c3711e3ef828ea211376a80455ca3770..f599742b8eb664c1bd9bebde83b78b84b4c73420 100644
--- a/runtime/vm/heap.cc
+++ b/runtime/vm/heap.cc
@@ -91,12 +91,6 @@ uword Heap::AllocateNew(intptr_t size) {
uword Heap::AllocateOld(intptr_t size, HeapPage::PageType type) {
ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
-#if defined(DEBUG)
- // Currently, allocation from non-Dart threads must not trigger GC.
- if (GrowthControlState()) {
- isolate()->AssertCurrentThreadIsMutator();
- }
-#endif
uword addr = old_space_.TryAllocate(size, type);
if (addr != 0) {
return addr;
@@ -440,11 +434,12 @@ bool Heap::ShouldPretenure(intptr_t class_id) const {
void Heap::UpdatePretenurePolicy() {
if (FLAG_disable_alloc_stubs_after_gc) {
ClassTable* table = isolate_->class_table();
+ Zone* zone = Thread::Current()->zone();
for (intptr_t cid = 1; cid < table->NumCids(); ++cid) {
if (((cid >= kNumPredefinedCids) || (cid == kArrayCid)) &&
table->IsValidIndex(cid) &&
table->HasValidClassAt(cid)) {
- const Class& cls = Class::Handle(isolate_, table->At(cid));
+ const Class& cls = Class::Handle(zone, table->At(cid));
cls.DisableAllocationStub();
}
}
« no previous file with comments | « no previous file | runtime/vm/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698