Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index bd9b0d69967ecec4e3e3b2a99afee473d81b30ce..af1a76d007717b73c88801b60874ded8a11b4cf3 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -6911,7 +6911,8 @@ bool HOptimizedGraphBuilder::TryCallApply(Call* expr) { |
Handle<JSFunction> known_function; |
if (function->IsConstant()) { |
HConstant* constant_function = HConstant::cast(function); |
- known_function = Handle<JSFunction>::cast(constant_function->handle()); |
+ known_function = Handle<JSFunction>::cast( |
+ constant_function->handle(isolate())); |
int args_count = arguments_count - 1; // Excluding receiver. |
if (TryInlineApply(known_function, expr, args_count)) return true; |
} |
@@ -7991,12 +7992,15 @@ void HOptimizedGraphBuilder::HandleLiteralCompareTypeof(CompareOperation* expr, |
} |
-static bool IsLiteralCompareBool(HValue* left, |
+static bool IsLiteralCompareBool(Isolate* isolate, |
+ HValue* left, |
Token::Value op, |
HValue* right) { |
return op == Token::EQ_STRICT && |
- ((left->IsConstant() && HConstant::cast(left)->handle()->IsBoolean()) || |
- (right->IsConstant() && HConstant::cast(right)->handle()->IsBoolean())); |
+ ((left->IsConstant() && |
+ HConstant::cast(left)->handle(isolate)->IsBoolean()) || |
+ (right->IsConstant() && |
+ HConstant::cast(right)->handle(isolate)->IsBoolean())); |
} |
@@ -8048,7 +8052,7 @@ void HOptimizedGraphBuilder::VisitCompareOperation(CompareOperation* expr) { |
HValue* left = Pop(); |
Token::Value op = expr->op(); |
- if (IsLiteralCompareBool(left, op, right)) { |
+ if (IsLiteralCompareBool(isolate(), left, op, right)) { |
HCompareObjectEqAndBranch* result = |
New<HCompareObjectEqAndBranch>(left, right); |
result->set_position(expr->position()); |