Index: src/builtins/builtins.cc |
diff --git a/src/builtins/builtins.cc b/src/builtins/builtins.cc |
index 8e32cc57796ecaa7343bb6c4d86666e97e3c8e06..ec981fe01edba1beea76c7805a86841bf4d8a911 100644 |
--- a/src/builtins/builtins.cc |
+++ b/src/builtins/builtins.cc |
@@ -84,7 +84,8 @@ Code* BuildWithCodeStubAssemblerJS(Isolate* isolate, |
Code::Flags flags, const char* name) { |
HandleScope scope(isolate); |
Zone zone(isolate->allocator(), ZONE_NAME); |
- const int argc_with_recv = argc + 1; |
+ const int argc_with_recv = |
+ (argc == SharedFunctionInfo::kDontAdaptArgumentsSentinel) ? 0 : argc + 1; |
CodeStubAssembler assembler(isolate, &zone, argc_with_recv, flags, name); |
generator(&assembler); |
Handle<Code> code = assembler.GenerateCode(); |