Index: src/compiler/pipeline.cc |
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc |
index b816f533f8a35f3401967b23416bfc566c269a40..b8dc459e0e30ab8dabf3fea0c7ae4f89d6680f33 100644 |
--- a/src/compiler/pipeline.cc |
+++ b/src/compiler/pipeline.cc |
@@ -498,7 +498,9 @@ struct InliningPhase { |
CommonOperatorReducer common_reducer(&graph_reducer, data->graph(), |
data->common(), data->machine()); |
JSContextSpecialization context_specialization( |
- &graph_reducer, data->jsgraph(), data->info()->context()); |
+ &graph_reducer, data->jsgraph(), data->info()->is_context_specializing() |
+ ? data->info()->context() |
+ : MaybeHandle<Context>()); |
JSFrameSpecialization frame_specialization(data->info()->osr_frame(), |
data->jsgraph()); |
JSInliner inliner(&graph_reducer, data->info()->is_inlining_enabled() |
@@ -510,9 +512,7 @@ struct InliningPhase { |
if (data->info()->is_frame_specializing()) { |
AddReducer(data, &graph_reducer, &frame_specialization); |
} |
- if (data->info()->is_context_specializing()) { |
- AddReducer(data, &graph_reducer, &context_specialization); |
- } |
+ AddReducer(data, &graph_reducer, &context_specialization); |
AddReducer(data, &graph_reducer, &inliner); |
graph_reducer.ReduceGraph(); |
} |