mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Fix generic native methods to work with extra args (313153, r/sr=mrbkap/shaver).
This commit is contained in:
parent
4ee1e637be
commit
10de8e659f
@ -3486,7 +3486,7 @@ js_generic_native_method_dispatcher(JSContext *cx, JSObject *obj,
|
||||
* the class constructor object, e.g. Array. Then call the corresponding
|
||||
* prototype native method with our first argument passed as |this|.
|
||||
*/
|
||||
memmove(argv - 1, argv, (fs->nargs + 1) * sizeof(jsval));
|
||||
memmove(argv - 1, argv, JS_MAX(fs->nargs + 1, argc) * sizeof(jsval));
|
||||
|
||||
/*
|
||||
* Follow Function.prototype.apply and .call by using the global object as
|
||||
|
Loading…
Reference in New Issue
Block a user