Index: src/builtins.cc |
diff --git a/src/builtins.cc b/src/builtins.cc |
index f4ebdc2a3e55139cb72fcaf063a235a347de4e7f..d17137f2289f8a82326fef5953de930dbff9be94 100644 |
--- a/src/builtins.cc |
+++ b/src/builtins.cc |
@@ -212,8 +212,9 @@ static MaybeObject* ArrayCodeGenericCommon(Arguments* args, |
if (maybe_array->IsFailure()) return maybe_array; |
AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(array); |
- ElementsKind to_kind = array->GetElementsKind(); |
- if (info != NULL && info->GetElementsKindPayload(&to_kind)) { |
+ if (info != NULL && info->IsValid()) { |
+ AllocationSite* site = info->GetAllocationSite(); |
+ ElementsKind to_kind = site->GetElementsKindPayload(); |
if (IsMoreGeneralElementsKindTransition(array->GetElementsKind(), |
to_kind)) { |
// We have advice that we should change the elements kind |