Chromium Code Reviews| Index: runtime/vm/flow_graph_builder.cc |
| diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc |
| index da2caaadb36901bf66eba322f7d04cc64e55e28e..e514c2e6d08618d1d32039179cfd6e49ffa810bf 100644 |
| --- a/runtime/vm/flow_graph_builder.cc |
| +++ b/runtime/vm/flow_graph_builder.cc |
| @@ -2531,13 +2531,11 @@ static void CollectClosureFunction(const Function& function) { |
| if (function.HasCode()) return; |
| Isolate* isolate = Isolate::Current(); |
| - if (isolate->collected_closures() == GrowableObjectArray::null()) { |
| - isolate->set_collected_closures( |
| - GrowableObjectArray::Handle(GrowableObjectArray::New())); |
| + if (isolate->collected_closures() != GrowableObjectArray::null()) { |
|
srdjan
2015/10/13 21:30:12
Please add a comment why the check is necessary, e
rmacnak
2015/10/13 21:55:01
Done.
|
| + const GrowableObjectArray& functions = |
| + GrowableObjectArray::Handle(isolate, isolate->collected_closures()); |
| + functions.Add(function); |
| } |
| - const GrowableObjectArray& functions = |
| - GrowableObjectArray::Handle(isolate, isolate->collected_closures()); |
| - functions.Add(function); |
| } |