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, ...@@ -454,7 +454,7 @@ static HRESULT prop_get(jsdisp_t *This, IDispatch *jsthis, dispex_prop_t *prop,
switch(prop->type) { switch(prop->type) {
case PROP_BUILTIN: case PROP_BUILTIN:
hres = prop->u.p->getter(This->ctx, This, r); hres = prop->u.p->getter(This->ctx, prop_obj, r);
break; break;
case PROP_JSVAL: case PROP_JSVAL:
hres = jsval_copy(prop->u.val, r); hres = jsval_copy(prop->u.val, r);
......
...@@ -1720,6 +1720,9 @@ sync_test("builtin_context", function() { ...@@ -1720,6 +1720,9 @@ sync_test("builtin_context", function() {
ok(obj === window, "obj = " + obj); ok(obj === window, "obj = " + obj);
obj = (function() { return this; }).call(42); obj = (function() { return this; }).call(42);
ok(obj.valueOf() === 42, "obj = " + obj); ok(obj.valueOf() === 42, "obj = " + obj);
obj = Object.create([100]);
ok(obj.length === 1, "obj.length = " + obj.length);
}); });
sync_test("host this", function() { 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