mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:54:05 +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:
parent
1b1d09724a
commit
954dd16fb1
|
@ -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() {
|
||||||
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() {
|
||||||
|
|
Loading…
Reference in a new issue