Index: src/compiler-dispatcher/compiler-dispatcher-job.cc |
diff --git a/src/compiler-dispatcher/compiler-dispatcher-job.cc b/src/compiler-dispatcher/compiler-dispatcher-job.cc |
index 28ec75ed5a64d307403091c9a4c03c846e3f9c57..34f988718146aa8eaaa36e033c8fba8e71fe4f22 100644 |
--- a/src/compiler-dispatcher/compiler-dispatcher-job.cc |
+++ b/src/compiler-dispatcher/compiler-dispatcher-job.cc |
@@ -151,10 +151,11 @@ |
parse_info_->set_shared_info(shared_); |
{ |
- // Create a canonical handle scope for compiling Ignition bytecode. This |
- // is required by the constant array builder to de-duplicate objects |
- // without dereferencing handles. |
- CanonicalHandleScope canonical(isolate_); |
+ // Create a canonical handle scope if compiling ignition bytecode. This is |
+ // required by the constant array builder to de-duplicate objects without |
+ // dereferencing handles. |
+ std::unique_ptr<CanonicalHandleScope> canonical; |
+ if (FLAG_ignition) canonical.reset(new CanonicalHandleScope(isolate_)); |
// Do the parsing tasks which need to be done on the main thread. This |
// will also handle parse errors. |