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

Unified Diff: runtime/vm/scavenger.cc

Issue 1394673002: Move reusable handles from isolate to thread. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix release build 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/reusable_handles.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scavenger.cc
diff --git a/runtime/vm/scavenger.cc b/runtime/vm/scavenger.cc
index f526af1b6b2165e9f680dbabf47639309003874e..c2822b547e7135461da587c16ded3a73378112f5 100644
--- a/runtime/vm/scavenger.cc
+++ b/runtime/vm/scavenger.cc
@@ -258,9 +258,10 @@ class ScavengerWeakVisitor : public HandleVisitor {
// 'prologue_weak_were_strong' is currently only used for sanity checking.
explicit ScavengerWeakVisitor(Scavenger* scavenger,
bool prologue_weak_were_strong)
- : HandleVisitor(scavenger->heap_->isolate()),
+ : HandleVisitor(Thread::Current()),
scavenger_(scavenger),
prologue_weak_were_strong_(prologue_weak_were_strong) {
+ ASSERT(scavenger->heap_->isolate() == Thread::Current()->isolate());
}
void VisitHandle(uword addr) {
@@ -270,9 +271,9 @@ class ScavengerWeakVisitor : public HandleVisitor {
if (scavenger_->IsUnreachable(p)) {
ASSERT(!handle->IsPrologueWeakPersistent() ||
!prologue_weak_were_strong_);
- handle->UpdateUnreachable(isolate());
+ handle->UpdateUnreachable(thread()->isolate());
} else {
- handle->UpdateRelocated(isolate());
+ handle->UpdateRelocated(thread()->isolate());
}
}
« no previous file with comments | « runtime/vm/reusable_handles.h ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698