Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index 0ddd78815378c2d7535bd6983553ce557ae900c0..0fc2f211389ca323782422b981e2bbac0df3232a 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -8381,6 +8381,13 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target, |
} |
} |
+ // Unsupported variable references present. |
+ if (function->scope()->this_function_var() != nullptr || |
+ function->scope()->new_target_var() != nullptr) { |
+ TraceInline(target, caller, "target uses new target or this function"); |
+ return false; |
+ } |
+ |
// All declarations must be inlineable. |
ZoneList<Declaration*>* decls = target_info.scope()->declarations(); |
int decl_count = decls->length(); |