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

Unified Diff: src/heap-inl.h

Issue 104903002: Generalize AllocationMemento::FindForHeapObject and remove corresponding new space check. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 525c634da626809c7c1bdfa3ce70b512e8eca621..0ba4a60fcaca1848174787d62e3ac368854b59b0 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -484,9 +484,10 @@ void Heap::ScavengePointer(HeapObject** p) {
void Heap::UpdateAllocationSiteFeedback(HeapObject* object) {
- if (FLAG_allocation_site_pretenuring && object->IsJSObject()) {
- AllocationMemento* memento = AllocationMemento::FindForJSObject(
- JSObject::cast(object), true);
+ if (FLAG_allocation_site_pretenuring &&
+ AllocationSite::CanTrack(object->map()->instance_type())) {
+ AllocationMemento* memento = AllocationMemento::FindForHeapObject(
+ object, true);
if (memento != NULL) {
ASSERT(memento->IsValid());
memento->GetAllocationSite()->IncrementMementoFoundCount();
« no previous file with comments | « no previous file | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698