зеркало из https://github.com/mozilla/gecko-dev.git
Fix generic native methods to work with extra args (313153, r/sr=mrbkap/shaver).
This commit is contained in:
Родитель
4ee1e637be
Коммит
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
|
||||
|
|
Загрузка…
Ссылка в новой задаче