Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index a8fe6bb7b61b2524c6f84313370ab665b234424e..edd3ac728288e6b5b8a289146637f784f5e90cf4 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -834,7 +834,11 @@ int JavaScriptFrame::GetNumberOfIncomingArguments() const { |
DCHECK(can_access_heap_objects() && |
isolate()->heap()->gc_state() == Heap::NOT_IN_GC); |
- return function()->shared()->internal_formal_parameter_count(); |
+ int param_count = function()->shared()->internal_formal_parameter_count(); |
+ if (param_count == SharedFunctionInfo::kDontAdaptArgumentsSentinel) { |
+ param_count = function()->shared()->length(); |
+ } |
+ return param_count; |
Dan Ehrenberg
2016/05/18 18:58:02
Why is this change needed?
caitp (gmail)
2016/05/18 19:03:43
for anything with DontAdaptArguments() called on t
|
} |