From a4869de7fa5e72fe2daed6bdae11b934f4350aa3 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 10 Sep 2012 10:35:05 +0200 Subject: [PATCH] mshtml: Check if value is function only when it needs to be in invoke_builtin_prop. --- dlls/mshtml/dispex.c | 12 ++++++------ dlls/mshtml/tests/vbtest.html | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index a3ac623486d..eca45a69959 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -979,13 +979,13 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD if(FAILED(hres)) return hres; - if(V_VT(&v) != VT_DISPATCH) { - FIXME("Not a function %s\n", debugstr_variant(&v)); - VariantClear(&v); - return E_FAIL; - } - if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD)) { + if(V_VT(&v) != VT_DISPATCH) { + FIXME("Not a function %s\n", debugstr_variant(&v)); + VariantClear(&v); + return E_FAIL; + } + hres = invoke_disp_value(This, V_DISPATCH(&v), lcid, flags, dp, res, ei, caller); IDispatch_Release(V_DISPATCH(&v)); }else if(res) { diff --git a/dlls/mshtml/tests/vbtest.html b/dlls/mshtml/tests/vbtest.html index b864abc4690..f424b3841a2 100644 --- a/dlls/mshtml/tests/vbtest.html +++ b/dlls/mshtml/tests/vbtest.html @@ -31,6 +31,7 @@ If true then counter = counter+1 Sub runTest() Call ok(counter = 6, "counter = " & counter) + Call ok(isNull(document.onkeyup), "document.onkeyup is not null") Call external.reportSuccess() End Sub -- 2.11.4.GIT