Chromium Code Reviews| Index: src/ast/ast-numbering.cc |
| diff --git a/src/ast/ast-numbering.cc b/src/ast/ast-numbering.cc |
| index d0101828d6897f99c91e069024460c4aae10ebf6..a6172ab9ea14dd2011515794e9493b98a9c02934 100644 |
| --- a/src/ast/ast-numbering.cc |
| +++ b/src/ast/ast-numbering.cc |
| @@ -577,6 +577,12 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
| DisableOptimization(kGenerator); |
| } |
| + // 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_)); |
|
marja
2016/09/12 07:26:41
Why do we need to create the canonical handle scop
|
| + |
| VisitDeclarations(scope->declarations()); |
| VisitStatements(node->body()); |