Jacek Caban : mshtml: Don' t assume that nsIDOMHTMLScriptElement inherits from nsIDOMHTMLElement in get_script_guid.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Oct 2 16:29:22 CDT 2014
Module: wine
Branch: master
Commit: 013b403c5813e5b87e08ff765e7db75c30eb8b98
URL: http://source.winehq.org/git/wine.git/?a=commit;h=013b403c5813e5b87e08ff765e7db75c30eb8b98
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Oct 2 11:56:18 2014 +0200
mshtml: Don't assume that nsIDOMHTMLScriptElement inherits from nsIDOMHTMLElement in get_script_guid.
---
dlls/mshtml/script.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c
index da6839f..4e79df5 100644
--- a/dlls/mshtml/script.c
+++ b/dlls/mshtml/script.c
@@ -849,6 +849,7 @@ static BOOL get_guid_from_language(LPCWSTR type, GUID *guid)
static BOOL get_script_guid(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *nsscript, GUID *guid)
{
+ nsIDOMHTMLElement *nselem;
const PRUnichar *language;
nsAString val_str;
BOOL ret = FALSE;
@@ -872,7 +873,11 @@ static BOOL get_script_guid(HTMLInnerWindow *window, nsIDOMHTMLScriptElement *ns
ERR("GetType failed: %08x\n", nsres);
}
- nsres = get_elem_attr_value((nsIDOMHTMLElement*)nsscript, languageW, &val_str, &language);
+ nsres = nsIDOMHTMLScriptElement_QueryInterface(nsscript, &IID_nsIDOMHTMLElement, (void**)&nselem);
+ assert(nsres == NS_OK);
+
+ nsres = get_elem_attr_value(nselem, languageW, &val_str, &language);
+ nsIDOMHTMLElement_Release(nselem);
if(NS_SUCCEEDED(nsres)) {
if(*language) {
ret = get_guid_from_language(language, guid);
More information about the wine-cvs
mailing list