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

Unified Diff: src/heap/heap.cc

Issue 541353003: Fix EvacuateJSFunction to obtain the target address from the forwarding pointer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix test Created 6 years, 3 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 | test/mjsunit/regress/regress-410912.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 65ad7bc98a719347b981a8f7bd72131069b4f210..36244574c61c5312a8ab47f14a88184c9eba9558 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -2064,7 +2064,10 @@ class ScavengingVisitor : public StaticVisitorBase {
ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized<
JSFunction::kSize>(map, slot, object);
- HeapObject* target = *slot;
+ MapWord map_word = object->map_word();
+ DCHECK(map_word.IsForwardingAddress());
+ HeapObject* target = map_word.ToForwardingAddress();
+
MarkBit mark_bit = Marking::MarkBitFrom(target);
if (Marking::IsBlack(mark_bit)) {
// This object is black and it might not be rescanned by marker.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-410912.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698