Commit 02406d4f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Add DISPATCH_PROPERTYGET flag only for DISPATCH_METHOD call in disp_call_value.

Spotted by Qian Hong.
parent 063ef3ca
......@@ -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;");
......
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