1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

jscript: Use the object containing the prop for builtin getters.

Since they act like values.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
This commit is contained in:
Gabriel Ivăncescu 2023-07-31 18:50:59 +03:00 committed by Alexandre Julliard
parent 1b1d09724a
commit 954dd16fb1
2 changed files with 4 additions and 1 deletions

View File

@ -454,7 +454,7 @@ static HRESULT prop_get(jsdisp_t *This, IDispatch *jsthis, dispex_prop_t *prop,
switch(prop->type) {
case PROP_BUILTIN:
hres = prop->u.p->getter(This->ctx, This, r);
hres = prop->u.p->getter(This->ctx, prop_obj, r);
break;
case PROP_JSVAL:
hres = jsval_copy(prop->u.val, r);

View File

@ -1720,6 +1720,9 @@ sync_test("builtin_context", function() {
ok(obj === window, "obj = " + obj);
obj = (function() { return this; }).call(42);
ok(obj.valueOf() === 42, "obj = " + obj);
obj = Object.create([100]);
ok(obj.length === 1, "obj.length = " + obj.length);
});
sync_test("host this", function() {