Module: wine Branch: master Commit: 898b705e834f445c497b66ef240f7af1a1e7907b URL: https://gitlab.winehq.org/wine/wine/-/commit/898b705e834f445c497b66ef240f7af...
Author: Gabriel Ivăncescu gabrielopcode@gmail.com Date: Thu Jun 22 16:19:01 2023 +0300
jscript: Don't expose Function.prototype.arguments in non-html mode.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com
---
dlls/jscript/function.c | 2 +- dlls/jscript/tests/api.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index c4ee495a428..a0450c57fe4 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -582,7 +582,7 @@ static HRESULT Function_gc_traverse(struct gc_ctx *gc_ctx, enum gc_traverse_op o
static const builtin_prop_t Function_props[] = { {L"apply", Function_apply, PROPF_METHOD|2}, - {L"arguments", NULL, 0, Function_get_arguments}, + {L"arguments", NULL, PROPF_HTML, Function_get_arguments}, {L"bind", Function_bind, PROPF_METHOD|PROPF_ES5|1}, {L"call", Function_call, PROPF_METHOD|1}, {L"caller", NULL, PROPF_HTML, Function_get_caller}, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index a7a6f5a0ac2..d632d889476 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -287,6 +287,7 @@ ok(Object.prototype.hasOwnProperty('toString'), "Object.prototype.hasOwnProperty ok(Object.prototype.hasOwnProperty('isPrototypeOf'), "Object.prototype.hasOwnProperty('isPrototypeOf') is false"); ok(Function.prototype.hasOwnProperty('call'), "Function.prototype.hasOwnProperty('call') is false"); ok(!Function.prototype.hasOwnProperty('caller'), "Function.prototype.hasOwnProperty('caller') is true"); +ok(!Function.prototype.hasOwnProperty('arguments'), "Function.prototype.hasOwnProperty('arguments') is true");
Object(); new Object();