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

Unified Diff: src/mark-compact.cc

Issue 310783003: Visit encountered JSWeakCollection list during scavenging. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 | « src/mark-compact.h ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mark-compact.cc
diff --git a/src/mark-compact.cc b/src/mark-compact.cc
index fcaad0def2dee36ce5e03c3994e77137ed7a053d..53f884c6af5a86d8de9d643bd02a1e2e067c21bb 100644
--- a/src/mark-compact.cc
+++ b/src/mark-compact.cc
@@ -51,7 +51,6 @@ MarkCompactCollector::MarkCompactCollector(Heap* heap) : // NOLINT
migration_slots_buffer_(NULL),
heap_(heap),
code_flusher_(NULL),
- encountered_weak_collections_(NULL),
have_code_to_deoptimize_(false) { }
#ifdef VERIFY_HEAP
@@ -2738,7 +2737,7 @@ void MarkCompactCollector::ClearNonLiveDependentCode(DependentCode* entries) {
void MarkCompactCollector::ProcessWeakCollections() {
GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_WEAKCOLLECTION_PROCESS);
- Object* weak_collection_obj = encountered_weak_collections();
+ Object* weak_collection_obj = heap()->encountered_weak_collections();
while (weak_collection_obj != Smi::FromInt(0)) {
JSWeakCollection* weak_collection =
reinterpret_cast<JSWeakCollection*>(weak_collection_obj);
@@ -2765,7 +2764,7 @@ void MarkCompactCollector::ProcessWeakCollections() {
void MarkCompactCollector::ClearWeakCollections() {
GCTracer::Scope gc_scope(tracer_, GCTracer::Scope::MC_WEAKCOLLECTION_CLEAR);
- Object* weak_collection_obj = encountered_weak_collections();
+ Object* weak_collection_obj = heap()->encountered_weak_collections();
while (weak_collection_obj != Smi::FromInt(0)) {
JSWeakCollection* weak_collection =
reinterpret_cast<JSWeakCollection*>(weak_collection_obj);
@@ -2782,7 +2781,7 @@ void MarkCompactCollector::ClearWeakCollections() {
weak_collection_obj = weak_collection->next();
weak_collection->set_next(heap()->undefined_value());
}
- set_encountered_weak_collections(Smi::FromInt(0));
+ heap()->set_encountered_weak_collections(Smi::FromInt(0));
}
« no previous file with comments | « src/mark-compact.h ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698