Return early from BinaryOpIC::Transition when the JS call failed

This avoids an ASSERT failure in Chromium net_unittests.

R=yangguo@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17417 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-10-28 16:32:56 +00:00
parent eb34e1397a
commit 5b5f2e59dc

View File

@ -2306,6 +2306,7 @@ MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) {
right_type->Maybe(Type::Smi()); right_type->Maybe(Type::Smi());
Maybe<Handle<Object> > result = stub.Result(left, right, isolate()); Maybe<Handle<Object> > result = stub.Result(left, right, isolate());
if (!result.has_value) return Failure::Exception();
#ifdef DEBUG #ifdef DEBUG
if (FLAG_trace_ic) { if (FLAG_trace_ic) {
@ -2346,9 +2347,8 @@ MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) {
PatchInlinedSmiCode(address(), DISABLE_INLINED_SMI_CHECK); PatchInlinedSmiCode(address(), DISABLE_INLINED_SMI_CHECK);
} }
return result.has_value ASSERT(result.has_value);
? static_cast<MaybeObject*>(*result.value) return static_cast<MaybeObject*>(*result.value);
: Failure::Exception();
} }