Jacek Caban : mshtml: Check if value is function only when it needs to be in invoke_builtin_prop .
Alexandre Julliard
julliard at winehq.org
Mon Sep 10 15:22:11 CDT 2012
Module: wine
Branch: master
Commit: a4869de7fa5e72fe2daed6bdae11b934f4350aa3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a4869de7fa5e72fe2daed6bdae11b934f4350aa3
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Sep 10 10:35:05 2012 +0200
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 a3ac623..eca45a6 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 b864abc..f424b38 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
</script>
More information about the wine-cvs
mailing list