mirror of
https://github.com/reactos/wine.git
synced 2025-02-14 01:31:43 +00:00
jscript: Add DISPATCH_PROPERTYGET flag only for DISPATCH_METHOD call in disp_call_value.
Spotted by Qian Hong.
This commit is contained in:
parent
063ef3ca0e
commit
02406d4fd4
@ -1202,7 +1202,7 @@ HRESULT disp_call_value(script_ctx_t *ctx, IDispatch *disp, IDispatch *jsthis, W
|
||||
return hres;
|
||||
}
|
||||
|
||||
if(r && argc)
|
||||
if(r && argc && flags == DISPATCH_METHOD)
|
||||
flags |= DISPATCH_PROPERTYGET;
|
||||
|
||||
hres = IDispatch_QueryInterface(disp, &IID_IDispatchEx, (void**)&dispex);
|
||||
|
@ -95,6 +95,7 @@ DEFINE_EXPECT(dispexfunc_value);
|
||||
DEFINE_EXPECT(testobj_delete_test);
|
||||
DEFINE_EXPECT(testobj_delete_nodelete);
|
||||
DEFINE_EXPECT(testobj_value);
|
||||
DEFINE_EXPECT(testobj_construct);
|
||||
DEFINE_EXPECT(testobj_prop_d);
|
||||
DEFINE_EXPECT(testobj_withprop_d);
|
||||
DEFINE_EXPECT(testobj_withprop_i);
|
||||
@ -364,6 +365,10 @@ static HRESULT WINAPI testObj_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
|
||||
case INVOKE_FUNC|INVOKE_PROPERTYGET:
|
||||
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
|
||||
break;
|
||||
case DISPATCH_CONSTRUCT:
|
||||
CHECK_EXPECT(testobj_construct);
|
||||
ok(pdp->cArgs == 1, "cArgs = %d\n", pdp->cArgs);
|
||||
break;
|
||||
default:
|
||||
ok(0, "invalid flag (%x)\n", wFlags);
|
||||
}
|
||||
@ -2121,6 +2126,10 @@ static BOOL run_tests(void)
|
||||
parse_script_a("ok(String.prototype.concat.call(testObj, ' OK') === '1 OK', 'wrong concat result');");
|
||||
CHECK_CALLED(testobj_value);
|
||||
|
||||
SET_EXPECT(testobj_construct);
|
||||
parse_script_a("var t = new testObj(1);");
|
||||
CHECK_CALLED(testobj_construct);
|
||||
|
||||
SET_EXPECT(global_propget_d);
|
||||
SET_EXPECT(global_propget_i);
|
||||
parse_script_a("this.testPropGet;");
|
||||
|
Loading…
x
Reference in New Issue
Block a user