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

Unified Diff: src/ic.cc

Issue 49103002: Return early from BinaryOpIC::Transition when the JS call failed (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 months 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 4bff543a733305ec33c966e5a890195013e538c5..55d7ba936fb3068d105d2af10673aa31b4d1896c 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -2306,6 +2306,7 @@ MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) {
right_type->Maybe(Type::Smi());
Maybe<Handle<Object> > result = stub.Result(left, right, isolate());
+ if (!result.has_value) return Failure::Exception();
#ifdef DEBUG
if (FLAG_trace_ic) {
@@ -2346,9 +2347,8 @@ MaybeObject* BinaryOpIC::Transition(Handle<Object> left, Handle<Object> right) {
PatchInlinedSmiCode(address(), DISABLE_INLINED_SMI_CHECK);
}
- return result.has_value
- ? static_cast<MaybeObject*>(*result.value)
- : Failure::Exception();
+ ASSERT(result.has_value);
+ return static_cast<MaybeObject*>(*result.value);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698