Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Unified Diff: src/frames.cc

Issue 1990803005: [runtime] set AsyncFunctionNext/Throw to adapt arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rework to support all functions without arguments adapter frames Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
}

Powered by Google App Engine
This is Rietveld 408576698