Created
August 25, 2014 15:47
-
-
Save AndreasMadsen/6581c06ca3eb7296477b to your computer and use it in GitHub Desktop.
Add CallSiteGetFunctionArguments to frame object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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