From 3dcd58cd54a922b864494fb7fff4a7f7a8562db9 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Fri, 3 Apr 2015 11:02:38 +0100 Subject: Fix a bug when creating a HDeoptimization instruction. We need to copy the environment, instead of just pointing to an existing one. Otherwise, if the instruction that initially holds the environemnt gets removed from the graph, any update to an instruction in that environment will not be reflected in it. bug:20058506 Change-Id: I2a62476d0851ecbc3707c0da395d8502ee437422 --- compiler/optimizing/nodes_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/nodes_test.cc') diff --git a/compiler/optimizing/nodes_test.cc b/compiler/optimizing/nodes_test.cc index 4cf22d3b2e..4e83ce576c 100644 --- a/compiler/optimizing/nodes_test.cc +++ b/compiler/optimizing/nodes_test.cc @@ -50,7 +50,7 @@ TEST(Node, RemoveInstruction) { exit_block->AddInstruction(new (&allocator) HExit()); HEnvironment* environment = new (&allocator) HEnvironment(&allocator, 1); - null_check->SetEnvironment(environment); + null_check->SetRawEnvironment(environment); environment->SetRawEnvAt(0, parameter); parameter->AddEnvUseAt(null_check->GetEnvironment(), 0); -- cgit v1.2.3-59-g8ed1b