| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index b798daa526d3702f53b9522f18ef63c9139bd3fe..c0989d1d112f70be6e4c7c1940a4f235cb9b415c 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -2268,10 +2268,11 @@
|
| source->info->set_script(script);
|
|
|
| {
|
| - // Create a canonical handle scope for compiling Ignition bytecode. This is
|
| + // Create a canonical handle scope if compiling ignition bytecode. This is
|
| // required by the constant array builder to de-duplicate objects without
|
| // dereferencing handles.
|
| - i::CanonicalHandleScope canonical(isolate);
|
| + std::unique_ptr<i::CanonicalHandleScope> canonical;
|
| + if (i::FLAG_ignition) canonical.reset(new i::CanonicalHandleScope(isolate));
|
|
|
| // Do the parsing tasks which need to be done on the main thread. This will
|
| // also handle parse errors.
|
|
|