Index: test/cctest/compiler/test-codegen-deopt.cc |
diff --git a/test/cctest/compiler/test-codegen-deopt.cc b/test/cctest/compiler/test-codegen-deopt.cc |
index 58ad363286e9db797a7edc32237f30756c69ee5e..7c5e05ab8a22ca7665429ae03b3e8e6d717a62f7 100644 |
--- a/test/cctest/compiler/test-codegen-deopt.cc |
+++ b/test/cctest/compiler/test-codegen-deopt.cc |
@@ -139,10 +139,11 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester { |
Unique<Object>::CreateUninitialized(deopt_function); |
Node* deopt_fun_node = m.NewNode(common.HeapConstant(deopt_fun_constant)); |
- Handle<Context> context(deopt_function->context(), CcTest::i_isolate()); |
- Unique<Object> context_constant = |
- Unique<Object>::CreateUninitialized(context); |
- Node* context_node = m.NewNode(common.HeapConstant(context_constant)); |
+ Handle<Context> caller_context(function->context(), CcTest::i_isolate()); |
+ Unique<Object> caller_context_constant = |
+ Unique<Object>::CreateUninitialized(caller_context); |
+ Node* caller_context_node = |
+ m.NewNode(common.HeapConstant(caller_context_constant)); |
bailout_id = GetCallBailoutId(); |
Node* parameters = m.NewNode(common.StateValues(1), m.UndefinedConstant()); |
@@ -151,7 +152,12 @@ class TrivialDeoptCodegenTester : public DeoptCodegenTester { |
Node* state_node = |
m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters, |
- locals, stack, m.UndefinedConstant(), m.UndefinedConstant()); |
+ locals, stack, caller_context_node, m.UndefinedConstant()); |
+ |
+ Handle<Context> context(deopt_function->context(), CcTest::i_isolate()); |
+ Unique<Object> context_constant = |
+ Unique<Object>::CreateUninitialized(context); |
+ Node* context_node = m.NewNode(common.HeapConstant(context_constant)); |
m.CallJS0(deopt_fun_node, m.UndefinedConstant(), context_node, state_node); |
@@ -260,7 +266,7 @@ class TrivialRuntimeDeoptCodegenTester : public DeoptCodegenTester { |
Node* state_node = |
m.NewNode(common.FrameState(bailout_id, kIgnoreOutput), parameters, |
- locals, stack, m.UndefinedConstant(), m.UndefinedConstant()); |
+ locals, stack, context_node, m.UndefinedConstant()); |
m.CallRuntime1(Runtime::kDeoptimizeFunction, this_fun_node, context_node, |
state_node); |