mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 884516 - Rename JS shell global 'arguments' variable to scriptArgs. r=luke.
This commit is contained in:
parent
8f4e38414e
commit
63d93f66cc
@ -1,4 +1,5 @@
|
||||
|
||||
arguments = [];
|
||||
try {
|
||||
arguments.toSource = (function() {
|
||||
__proto__.y = x
|
||||
|
@ -4888,13 +4888,7 @@ BindScriptArgs(JSContext *cx, JSObject *obj_, OptionParser *op)
|
||||
if (!scriptArgs)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* Script arguments are bound as a normal |arguments| property on the
|
||||
* global object. It has no special significance, like |arguments| in
|
||||
* function scope does -- this identifier is used de-facto across shell
|
||||
* implementations, see bug 675269.
|
||||
*/
|
||||
if (!JS_DefineProperty(cx, obj, "arguments", OBJECT_TO_JSVAL(scriptArgs), NULL, NULL, 0))
|
||||
if (!JS_DefineProperty(cx, obj, "scriptArgs", OBJECT_TO_JSVAL(scriptArgs), NULL, NULL, 0))
|
||||
return false;
|
||||
|
||||
for (size_t i = 0; !msr.empty(); msr.popFront(), ++i) {
|
||||
@ -5259,7 +5253,7 @@ main(int argc, char **argv, char **envp)
|
||||
#endif
|
||||
|| !op.addOptionalStringArg("script", "A script to execute (after all options)")
|
||||
|| !op.addOptionalMultiStringArg("scriptArgs",
|
||||
"String arguments to bind as |arguments| in the "
|
||||
"String arguments to bind as |scriptArgs| in the "
|
||||
"shell's global")
|
||||
#ifdef JS_THREADSAFE
|
||||
|| !op.addIntOption('\0', "thread-count", "COUNT", "Use COUNT auxiliary threads "
|
||||
|
Loading…
Reference in New Issue
Block a user