mshtml: Always set the URL policy in the error cases?
fgouget at free.fr
Mon Jul 16 03:37:41 CDT 2012
On Tue, 3 Jul 2012, Jacek Caban wrote:
> It would probably be more appropriate to add
> assert(SUCCEEDED(hres)); after IsClassOfCategories calls, which can't fail.
Ok. Would something like this be ok? It seems like this single assert()
is enough to make gcc happy here.
Author: Francois Gouget <fgouget at free.fr>
Date: Mon Jul 16 10:33:50 2012 +0200
mshtml: Avoid returning with an unset URL policy in error cases.
diff --git a/dlls/mshtml/secmgr.c b/dlls/mshtml/secmgr.c
index ff349ac..f961bca 100644
@@ -20,6 +20,7 @@
@@ -104,9 +105,7 @@ static HRESULT confirm_safety_load(HTMLDocumentNode *This, struct CONFIRMSAFETY
CATID init_catid = CATID_SafeForInitializing;
hres = ICatInformation_IsClassOfCategories(This->catmgr, &cs->clsid, 1, &init_catid, 0, NULL);
- return hres;
*ret = hres == S_OK ? URLPOLICY_ALLOW : URLPOLICY_DISALLOW;
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
Theory is where you know everything but nothing works.
Practice is where everything works but nobody knows why.
Sometimes they go hand in hand: nothing works and nobody knows why.
More information about the wine-devel