Fix assertion failure because of incorrect use of MaybeObjects.

Review URL: http://codereview.chromium.org/6599001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6950 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
ager@chromium.org 2011-02-25 12:56:46 +00:00
parent 3393fda0cf
commit a1cf6f2636

View File

@ -7279,8 +7279,10 @@ MaybeObject* JSObject::GetElementPostInterceptor(Object* receiver,
case EXTERNAL_INT_ELEMENTS:
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
case EXTERNAL_FLOAT_ELEMENTS: {
MaybeObject* value = GetExternalElement(index);
if (!value->ToObjectUnchecked()->IsUndefined()) return value;
MaybeObject* maybe_value = GetExternalElement(index);
Object* value;
if (!maybe_value->ToObject(&value)) return maybe_value;
if (!value->IsUndefined()) return value;
break;
}
case DICTIONARY_ELEMENTS: {
@ -7376,8 +7378,10 @@ MaybeObject* JSObject::GetElementWithReceiver(Object* receiver,
case EXTERNAL_INT_ELEMENTS:
case EXTERNAL_UNSIGNED_INT_ELEMENTS:
case EXTERNAL_FLOAT_ELEMENTS: {
MaybeObject* value = GetExternalElement(index);
if (!value->ToObjectUnchecked()->IsUndefined()) return value;
MaybeObject* maybe_value = GetExternalElement(index);
Object* value;
if (!maybe_value->ToObject(&value)) return maybe_value;
if (!value->IsUndefined()) return value;
break;
}
case DICTIONARY_ELEMENTS: {