Commit 954dd16f authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

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

Since they act like values. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent 1b1d0972
......@@ -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);
......
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment