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

Unified Diff: src/incremental-marking.cc

Issue 284633002: Fix incremental marking of native context when bootstrapping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Remove useless casting 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index 0cf6a9e1dc68fa55bbcdebcd420b1dda0725a442..b726a9bfcc704f4a16f5407d6799e4a2bc93373d 100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -222,9 +222,13 @@ class IncrementalMarkingMarkingVisitor
static void VisitNativeContextIncremental(Map* map, HeapObject* object) {
Context* context = Context::cast(object);
- // We will mark cache black with a separate pass
- // when we finish marking.
- MarkObjectGreyDoNotEnqueue(context->normalized_map_cache());
+ // We will mark cache black with a separate pass when we finish marking.
+ // Note that GC can happen when the context is not fully initialized,
+ // so the cache can be undefined.
+ Object* cache = context->get(Context::NORMALIZED_MAP_CACHE_INDEX);
+ if (!cache->IsUndefined()) {
+ MarkObjectGreyDoNotEnqueue(cache);
+ }
VisitNativeContext(map, context);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698