Test fix: missing check for JSArray.

BUG=

Review URL: https://codereview.chromium.org/11801036

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 529f801f
...@@ -9861,7 +9861,7 @@ MaybeObject* JSObject::SetFastElement(uint32_t index, ...@@ -9861,7 +9861,7 @@ MaybeObject* JSObject::SetFastElement(uint32_t index,
: FAST_DOUBLE_ELEMENTS; : FAST_DOUBLE_ELEMENTS;
MaybeObject* trans = PossiblyTransitionArrayBoilerplate(to_kind); MaybeObject* trans = PossiblyTransitionArrayBoilerplate(to_kind);
if (trans != NULL && trans->IsFailure()) return trans; if (trans->IsFailure()) return trans;
MaybeObject* maybe = MaybeObject* maybe =
SetFastDoubleElementsCapacityAndLength(new_capacity, array_length); SetFastDoubleElementsCapacityAndLength(new_capacity, array_length);
...@@ -10406,8 +10406,8 @@ Handle<Object> JSObject::TransitionElementsKind(Handle<JSObject> object, ...@@ -10406,8 +10406,8 @@ Handle<Object> JSObject::TransitionElementsKind(Handle<JSObject> object,
MaybeObject* JSObject::PossiblyTransitionArrayBoilerplate( MaybeObject* JSObject::PossiblyTransitionArrayBoilerplate(
ElementsKind to_kind) { ElementsKind to_kind) {
ASSERT(IsJSArray());
MaybeObject* ret = NULL; MaybeObject* ret = NULL;
if (IsJSArray()) {
AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(this); AllocationSiteInfo* info = AllocationSiteInfo::FindForJSObject(this);
if (info != NULL) { if (info != NULL) {
JSObject* payload = JSObject::cast(info->payload()); JSObject* payload = JSObject::cast(info->payload());
...@@ -10418,6 +10418,7 @@ MaybeObject* JSObject::PossiblyTransitionArrayBoilerplate( ...@@ -10418,6 +10418,7 @@ MaybeObject* JSObject::PossiblyTransitionArrayBoilerplate(
} }
} }
} }
}
return ret; return ret;
} }
...@@ -10433,7 +10434,7 @@ MaybeObject* JSObject::TransitionElementsKind(ElementsKind to_kind) { ...@@ -10433,7 +10434,7 @@ MaybeObject* JSObject::TransitionElementsKind(ElementsKind to_kind) {
if (from_kind == to_kind) return this; if (from_kind == to_kind) return this;
MaybeObject* trans = PossiblyTransitionArrayBoilerplate(to_kind); MaybeObject* trans = PossiblyTransitionArrayBoilerplate(to_kind);
if (trans != NULL && trans->IsFailure()) return trans; if (trans->IsFailure()) return trans;
Isolate* isolate = GetIsolate(); Isolate* isolate = GetIsolate();
if (elements() == isolate->heap()->empty_fixed_array() || if (elements() == isolate->heap()->empty_fixed_array() ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment