Index: src/ast-numbering.cc |
diff --git a/src/ast-numbering.cc b/src/ast-numbering.cc |
index c2dd70e1bbe75086a0de3e9097aac6d2b3dc49c1..60f41016030af4b27aa4571c87554d27c6514716 100644 |
--- a/src/ast-numbering.cc |
+++ b/src/ast-numbering.cc |
@@ -559,6 +559,14 @@ bool AstNumberingVisitor::Renumber(FunctionLiteral* node) { |
DisableCrankshaft(kContextAllocatedArguments); |
} |
+ // TODO(aperez): Add support in Crankshaft for arrow functions (issue #3814). |
+ if (scope->is_arrow_scope() && scope->uses_this()) { |
+ DisableCrankshaft(kCapturedThis); |
+ } |
+ if (scope->is_function_scope() && scope->inner_uses_this()) { |
+ DisableCrankshaft(kCapturedThis); |
+ } |
+ |
VisitDeclarations(scope->declarations()); |
if (scope->is_function_scope() && scope->function() != NULL) { |
// Visit the name of the named function expression. |