Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Add CallSiteGetFunctionArguments to frame object
diff --git a/src/messages.js b/src/messages.js
index c86c12d..ad5921c 100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -801,6 +801,10 @@ function CallSiteGetFunction() {
? UNDEFINED : GET_PRIVATE(this, CallSiteFunctionKey);
}
+function CallSiteGetFunctionArguments() {
+ return GET_PRIVATE(this, CallSiteFunctionKey).arguments;
+}
+
function CallSiteGetFunctionName() {
// See if the function knows its own name
var name = GET_PRIVATE(this, CallSiteFunctionKey).name;
@@ -973,6 +977,7 @@ SetUpLockedPrototype(CallSite, $Array("receiver", "fun", "pos"), $Array(
"getEvalOrigin", CallSiteGetEvalOrigin,
"getScriptNameOrSourceURL", CallSiteGetScriptNameOrSourceURL,
"getFunction", CallSiteGetFunction,
+ "getFunctionArguments", CallSiteGetFunctionArguments,
"getFunctionName", CallSiteGetFunctionName,
"getMethodName", CallSiteGetMethodName,
"getFileName", CallSiteGetFileName,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.