| Index: runtime/vm/flow_graph_optimizer.cc
|
| diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
|
| index 7f4ce9fa0d8d83045a4ccf3b62f2854f57c3a3b7..f10e60ca70622f8a7ab08ec966de4db0076ca3de 100644
|
| --- a/runtime/vm/flow_graph_optimizer.cc
|
| +++ b/runtime/vm/flow_graph_optimizer.cc
|
| @@ -276,7 +276,12 @@ bool FlowGraphOptimizer::TryCreateICData(InstanceCallInstr* call) {
|
| }
|
|
|
| // Check if getter or setter in function's class and class is currently leaf.
|
| - if (FLAG_guess_icdata_cid &&
|
| + // Do not run the optimization below if in background compilation since
|
| + // resolution of getter functions may create new signature classes.
|
| + // TODO(regis): Remove test for background compilation once signature classes
|
| + // are not generated any longer.
|
| + if (thread()->IsMutatorThread() &&
|
| + FLAG_guess_icdata_cid &&
|
| ((call->token_kind() == Token::kGET) ||
|
| (call->token_kind() == Token::kSET))) {
|
| const Class& owner_class = Class::Handle(Z, function().Owner());
|
|
|