Jacek Caban : mshtml: Fixed builtin getter call with arguments.
Alexandre Julliard
julliard at winehq.org
Mon Apr 1 13:48:41 CDT 2013
Module: wine
Branch: master
Commit: 8c0c09e4c707b41b4e5fd5492adfae41d577f7c5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c0c09e4c707b41b4e5fd5492adfae41d577f7c5
Author: Jacek Caban <jacek at codeweavers.com>
Date: Mon Apr 1 11:50:29 2013 +0200
mshtml: Fixed builtin getter call with arguments.
---
dlls/mshtml/dispex.c | 4 ++--
dlls/mshtml/tests/jstest.html | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c
index 38d9df4..d70ae2d 100644
--- a/dlls/mshtml/dispex.c
+++ b/dlls/mshtml/dispex.c
@@ -1216,7 +1216,7 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD
if(FAILED(hres))
return hres;
- if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD)) {
+ if(flags != (DISPATCH_PROPERTYGET|DISPATCH_METHOD) || dp->cArgs) {
if(V_VT(&v) != VT_DISPATCH) {
FIXME("Not a function %s\n", debugstr_variant(&v));
VariantClear(&v);
@@ -1228,7 +1228,7 @@ static HRESULT invoke_builtin_prop(DispatchEx *This, DISPID id, LCID lcid, WORD
}else if(res) {
*res = v;
}else {
- IDispatch_Release(V_DISPATCH(&v));
+ VariantClear(&v);
}
}
}
diff --git a/dlls/mshtml/tests/jstest.html b/dlls/mshtml/tests/jstest.html
index ebf2861..4185112 100644
--- a/dlls/mshtml/tests/jstest.html
+++ b/dlls/mshtml/tests/jstest.html
@@ -137,6 +137,8 @@ function test_getter_call() {
e.onmousedown = function(x) { this.onmousedown_called = x; };
e.onmousedown("test");
ok(e.onmousedown_called === "test", "e.onmousedown_called = " + e.onmousedown_called);
+
+ ok(document.all("divid").tagName === "DIV", "document.all('divid').tagName = " + document.all("divid").tagName);
}
function test_arg_conv() {
More information about the wine-cvs
mailing list