From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/function.c | 6 ++++++ dlls/mshtml/tests/documentmode.js | 5 +++++ 2 files changed, 11 insertions(+)
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c index 567e2596969..2e811b857cd 100644 --- a/dlls/jscript/function.c +++ b/dlls/jscript/function.c @@ -976,10 +976,16 @@ HRESULT create_source_function(script_ctx_t *ctx, bytecode_t *code, function_cod return S_OK; }
+static const builtin_prop_t HostFunction_props[] = { + {L"arguments", NULL, 0, Function_get_arguments}, +}; + static const builtin_info_t HostFunction_info = { .class = JSCLASS_FUNCTION, .call = Function_value, .destructor = Function_destructor, + .props_cnt = ARRAY_SIZE(HostFunction_props), + .props = HostFunction_props, .gc_traverse = Function_gc_traverse };
diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 073ca769cca..e7c2db6508a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -375,6 +375,7 @@ sync_test("builtin_obj", function() { ok(!(f.apply instanceof Function), "f.apply instance of Function"); ok(!(f.call instanceof Function), "f.call instance of Function"); ok(!("arguments" in f), "arguments in f"); + ok(!("caller" in f), "caller in f"); ok(!("length" in f), "length in f"); e = 0; try { @@ -393,6 +394,9 @@ sync_test("builtin_obj", function() { ok(e === "[object Window]", "window.toString with null context = " + e); e = window.toString.call(external.nullDisp); ok(e === "[object Window]", "window.toString with nullDisp context = " + e); + + test_own_props(f, "createElement", [ "arguments", "caller", "prototype" ], [ "caller", "prototype" ]); + ok(f.arguments === null, "createElement arguments = " + f.arguments); }
e = 0; @@ -4038,6 +4042,7 @@ sync_test("constructors", function() { }catch(e) { ok(e.number === 0x0ffff - 0x80000000, "new XMLHttpRequest.create() threw " + e.number); } + test_own_props(XMLHttpRequest.create, "XMLHttpRequest.create", [ "arguments", "caller", "prototype" ], [ "arguments", "caller", "prototype" ]);
r = Object.getOwnPropertyDescriptor(HTMLMetaElement, "prototype"); ok(r.value === HTMLMetaElement.prototype, "HTMLMetaElement.prototype value = " + r.value);