-- v3: mshtml: Handle S_FALSE return values from IUri methods. mshtml: Handle S_FALSE from IUri methods in the NSAPI interfaces. mshtml: Handle S_FALSE from IUri methods when navigating. mshtml: Don't navigate if GetDisplayUri failed. mshtml: Handle S_FALSE from IUri methods when checking targetOrigin. mshtml: Handle S_FALSE from IUri methods in Anchor Elements. mshtml: Handle S_FALSE from IUri methods in localStorage and sessionStorage.
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Also do not use the Uri itself as check for local vs session storage, because sessionStorage will rely on the Uri as well.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlstorage.c | 42 +++++++++++++++++++++--------------- dlls/mshtml/htmlwindow.c | 14 ++++++------ dlls/mshtml/mshtml_private.h | 2 +- dlls/mshtml/tests/dom.c | 33 ++++++++++++++++++++++++++++ 4 files changed, 67 insertions(+), 24 deletions(-)
diff --git a/dlls/mshtml/htmlstorage.c b/dlls/mshtml/htmlstorage.c index 1983d87a296..ae63c2b2f53 100644 --- a/dlls/mshtml/htmlstorage.c +++ b/dlls/mshtml/htmlstorage.c @@ -548,28 +548,20 @@ static dispex_static_data_t HTMLStorage_dispex = { HTMLStorage_iface_tids };
-static WCHAR *build_filename(IUri *uri) +static WCHAR *build_filename(BSTR hostname) { static const WCHAR store[] = L"\Microsoft\Internet Explorer\DOMStore\"; WCHAR path[MAX_PATH], *ret; - BSTR hostname; - HRESULT hres; int len;
- hres = IUri_GetHost(uri, &hostname); - if(hres != S_OK) - return NULL; - if(!SHGetSpecialFolderPathW(NULL, path, CSIDL_LOCAL_APPDATA, TRUE)) { ERR("Can't get folder path %lu\n", GetLastError()); - SysFreeString(hostname); return NULL; }
len = wcslen(path); if(len + ARRAY_SIZE(store) > ARRAY_SIZE(path)) { ERR("Path too long\n"); - SysFreeString(hostname); return NULL; } memcpy(path + len, store, sizeof(store)); @@ -577,7 +569,6 @@ static WCHAR *build_filename(IUri *uri) len += ARRAY_SIZE(store); ret = heap_alloc((len + wcslen(hostname) + ARRAY_SIZE(L".xml")) * sizeof(WCHAR)); if(!ret) { - SysFreeString(hostname); return NULL; }
@@ -585,7 +576,6 @@ static WCHAR *build_filename(IUri *uri) wcscat(ret, hostname); wcscat(ret, L".xml");
- SysFreeString(hostname); return ret; }
@@ -600,17 +590,33 @@ static WCHAR *build_mutexname(const WCHAR *filename) return ret; }
-HRESULT create_html_storage(compat_mode_t compat_mode, IUri *uri, IHTMLStorage **p) +HRESULT create_html_storage(HTMLInnerWindow *window, BOOL local, IHTMLStorage **p) { + IUri *uri = window->base.outer_window->uri; HTMLStorage *storage; + BSTR hostname = NULL; + HRESULT hres; + + if(!uri) + return S_FALSE; + + hres = IUri_GetHost(uri, &hostname); + if(hres != S_OK) { + SysFreeString(hostname); + return hres; + }
storage = heap_alloc_zero(sizeof(*storage)); - if(!storage) + if(!storage) { + SysFreeString(hostname); return E_OUTOFMEMORY; + }
- if(uri) { + if(local) { WCHAR *mutexname; - if(!(storage->filename = build_filename(uri))) { + storage->filename = build_filename(hostname); + SysFreeString(hostname); + if(!storage->filename) { heap_free(storage); return E_OUTOFMEMORY; } @@ -627,11 +633,13 @@ HRESULT create_html_storage(compat_mode_t compat_mode, IUri *uri, IHTMLStorage * heap_free(storage); return HRESULT_FROM_WIN32(GetLastError()); } - } + }else + SysFreeString(hostname);
storage->IHTMLStorage_iface.lpVtbl = &HTMLStorageVtbl; storage->ref = 1; - init_dispatch(&storage->dispex, (IUnknown*)&storage->IHTMLStorage_iface, &HTMLStorage_dispex, compat_mode); + init_dispatch(&storage->dispex, (IUnknown*)&storage->IHTMLStorage_iface, &HTMLStorage_dispex, + dispex_compat_mode(&window->event_target.dispex));
*p = &storage->IHTMLStorage_iface; return S_OK; diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 0043fb79731..7774e0fc92d 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -2143,10 +2143,11 @@ static HRESULT WINAPI HTMLWindow6_get_sessionStorage(IHTMLWindow6 *iface, IHTMLS if(!This->inner_window->session_storage) { HRESULT hres;
- hres = create_html_storage(dispex_compat_mode(&This->inner_window->event_target.dispex), - NULL, &This->inner_window->session_storage); - if(FAILED(hres)) + hres = create_html_storage(This->inner_window, FALSE, &This->inner_window->session_storage); + if(hres != S_OK) { + *p = NULL; return hres; + } }
IHTMLStorage_AddRef(This->inner_window->session_storage); @@ -2163,10 +2164,11 @@ static HRESULT WINAPI HTMLWindow6_get_localStorage(IHTMLWindow6 *iface, IHTMLSto if(!This->inner_window->local_storage) { HRESULT hres;
- hres = create_html_storage(dispex_compat_mode(&This->inner_window->event_target.dispex), - This->inner_window->base.outer_window->uri, &This->inner_window->local_storage); - if(FAILED(hres)) + hres = create_html_storage(This->inner_window, TRUE, &This->inner_window->local_storage); + if(hres != S_OK) { + *p = NULL; return hres; + } }
IHTMLStorage_AddRef(This->inner_window->local_storage); diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index 05b37c6b9db..23217ea3308 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -950,7 +950,7 @@ HRESULT create_namespace_collection(compat_mode_t,IHTMLNamespaceCollection**) DE HRESULT create_dom_implementation(HTMLDocumentNode*,IHTMLDOMImplementation**) DECLSPEC_HIDDEN; void detach_dom_implementation(IHTMLDOMImplementation*) DECLSPEC_HIDDEN;
-HRESULT create_html_storage(compat_mode_t,IUri*,IHTMLStorage**) DECLSPEC_HIDDEN; +HRESULT create_html_storage(HTMLInnerWindow*,BOOL,IHTMLStorage**) DECLSPEC_HIDDEN;
void HTMLDocument_Persist_Init(HTMLDocument*) DECLSPEC_HIDDEN; void HTMLDocument_OleCmd_Init(HTMLDocument*) DECLSPEC_HIDDEN; diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index e3ac177205c..5e135aa88ff 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -10891,6 +10891,37 @@ static void test_docfrag(IHTMLDocument2 *doc) IHTMLDocument2_Release(frag); }
+static void test_about_blank_storage(IHTMLDocument2 *doc) +{ + IHTMLStorage *storage; + IHTMLWindow6 *window6; + IHTMLWindow2 *window; + HRESULT hres; + + hres = IHTMLDocument2_get_parentWindow(doc, &window); + ok(hres == S_OK, "get_parentWindow failed: %08lx\n", hres); + ok(window != NULL, "window == NULL\n"); + + hres = IHTMLWindow2_QueryInterface(window, &IID_IHTMLWindow6, (void**)&window6); + IHTMLWindow2_Release(window); + if(FAILED(hres)) { + win_skip("IHTMLWindow6 not supported\n"); + return; + } + + storage = (IHTMLStorage*)(INT_PTR)0xdeadbeef; + hres = IHTMLWindow6_get_sessionStorage(window6, &storage); + ok(hres == S_FALSE, "get_sessionStorage failed: %08lx\n", hres); + ok(storage == NULL, "session_storage != NULL\n"); + + storage = (IHTMLStorage*)(INT_PTR)0xdeadbeef; + hres = IHTMLWindow6_get_localStorage(window6, &storage); + ok(hres == S_FALSE, "get_localStorage failed: %08lx\n", hres); + ok(storage == NULL, "local_storage != NULL\n"); + + IHTMLWindow6_Release(window6); +} + static void check_quirks_mode(IHTMLDocument2 *doc) { test_compatmode(doc, L"BackCompat"); @@ -11626,9 +11657,11 @@ START_TEST(dom) run_domtest(elem_test_str, test_elems); run_domtest(elem_test2_str, test_elems2); run_domtest(doc_blank, test_dom_elements); + run_domtest(doc_blank, test_about_blank_storage); if(is_ie9plus) { compat_mode = COMPAT_IE9; run_domtest(doc_blank_ie9, test_dom_elements); + run_domtest(doc_blank_ie9, test_about_blank_storage); compat_mode = COMPAT_NONE; } run_domtest(noscript_str, test_noscript);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlanchor.c | 9 +++++++++ dlls/mshtml/tests/dom.c | 6 ++++++ 2 files changed, 15 insertions(+)
diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index cfe49ac05bd..813d4eb3b2d 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -517,6 +517,10 @@ static HRESULT WINAPI HTMLAnchorElement_get_port(IHTMLAnchorElement *iface, BSTR IUri_Release(uri); if(FAILED(hres)) return hres; + if(hres != S_OK) { + *p = NULL; + return S_OK; + }
len = swprintf(buf, ARRAY_SIZE(buf), L"%u", port); str = SysAllocStringLen(buf, len); @@ -556,6 +560,11 @@ static HRESULT WINAPI HTMLAnchorElement_get_protocol(IHTMLAnchorElement *iface, IUri_Release(uri); if(FAILED(hres)) return hres; + if(hres != S_OK) { + SysFreeString(scheme); + *p = NULL; + return S_OK; + }
len = SysStringLen(scheme); if(len) { diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 5e135aa88ff..6f4e8ed007b 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -9479,6 +9479,12 @@ static void test_elems(IHTMLDocument2 *doc) test_anchor_hostname((IUnknown*)elem, L"test1"); test_anchor_port((IUnknown*)elem, L"8080");
+ /* about:blank */ + test_anchor_put_href((IUnknown*)elem, L"about:blank"); + test_anchor_href((IUnknown*)elem, L"about:blank"); + test_anchor_hostname((IUnknown*)elem, NULL); + test_anchor_port((IUnknown*)elem, NULL); + /* Restore the href */ test_anchor_put_href((IUnknown*)elem, L"http://test/"); test_anchor_href((IUnknown*)elem, L"http://test/");
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/htmlwindow.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 7774e0fc92d..b9dcfa6e913 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3181,24 +3181,32 @@ static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_ goto done; }
+ bstr = NULL; hres = IUri_GetSchemeName(uri, &bstr); - if(FAILED(hres)) + if(hres != S_OK) { + SysFreeString(bstr); goto done; + } hres = IUri_GetSchemeName(target, &bstr2); if(SUCCEEDED(hres)) { - hres = !wcsicmp(bstr, bstr2) ? S_OK : S_FALSE; + if(hres == S_OK && wcsicmp(bstr, bstr2)) + hres = S_FALSE; SysFreeString(bstr2); } SysFreeString(bstr); if(hres != S_OK) goto done;
+ bstr = NULL; hres = IUri_GetHost(uri, &bstr); - if(FAILED(hres)) + if(hres != S_OK) { + SysFreeString(bstr); goto done; + } hres = IUri_GetHost(target, &bstr2); if(SUCCEEDED(hres)) { - hres = !wcsicmp(bstr, bstr2) ? S_OK : S_FALSE; + if(hres == S_OK && wcsicmp(bstr, bstr2)) + hres = S_FALSE; SysFreeString(bstr2); } SysFreeString(bstr); @@ -3210,11 +3218,11 @@ static HRESULT check_target_origin(HTMLInnerWindow *window, const WCHAR *target_ goto done;
hres = IUri_GetPort(uri, &port); - if(FAILED(hres)) + if(hres != S_OK) goto done; hres = IUri_GetPort(target, &port2); - if(SUCCEEDED(hres)) - hres = (port == port2) ? S_OK : S_FALSE; + if(hres == S_OK && port != port2) + hres = S_FALSE;
done: IUri_Release(target);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/navigate.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index ef764bde58c..4cafa083b08 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -1677,9 +1677,11 @@ static void handle_extern_mime_navigation(nsChannelBSC *This) hres = IUnknown_QueryInterface(doc_obj->webbrowser, &IID_IWebBrowserPriv, (void**)&webbrowser_priv_old); if(SUCCEEDED(hres)) { V_VT(&uriv) = VT_BSTR; - IUri_GetDisplayUri(uri, &V_BSTR(&uriv)); + V_BSTR(&uriv) = NULL; + hres = IUri_GetDisplayUri(uri, &V_BSTR(&uriv));
- hres = IWebBrowserPriv_NavigateWithBindCtx(webbrowser_priv_old, &uriv, &flags, NULL, NULL, NULL, bind_ctx, NULL); + if(hres == S_OK) + hres = IWebBrowserPriv_NavigateWithBindCtx(webbrowser_priv_old, &uriv, &flags, NULL, NULL, NULL, bind_ctx, NULL);
SysFreeString(V_BSTR(&uriv)); IWebBrowserPriv_Release(webbrowser_priv_old);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Mostly by ignoring it, since no such Uri component exists.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/navigate.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c index 4cafa083b08..7b46065b9a1 100644 --- a/dlls/mshtml/navigate.c +++ b/dlls/mshtml/navigate.c @@ -2033,15 +2033,17 @@ static void navigate_javascript_proc(task_t *_task) { navigate_javascript_task_t *task = (navigate_javascript_task_t*)_task; HTMLOuterWindow *window = task->window; + BSTR code = NULL; VARIANT v; - BSTR code; HRESULT hres;
task->window->readystate = READYSTATE_COMPLETE;
hres = IUri_GetPath(task->uri, &code); - if(FAILED(hres)) + if(hres != S_OK) { + SysFreeString(code); return; + }
hres = UrlUnescapeW(code, NULL, NULL, URL_UNESCAPE_INPLACE); if(FAILED(hres)) { @@ -2109,8 +2111,8 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri) { nsIDOMLocation *nslocation; nsAString nsfrag_str; + BSTR frag = NULL; WCHAR *selector; - BSTR frag; nsresult nsres; HRESULT hres; static const WCHAR selector_formatW[] = L"a[id="%s"]"; @@ -2122,9 +2124,10 @@ static HRESULT navigate_fragment(HTMLOuterWindow *window, IUri *uri) return E_FAIL;
hres = IUri_GetFragment(uri, &frag); - if(FAILED(hres)) { + if(hres != S_OK) { + SysFreeString(frag); nsIDOMLocation_Release(nslocation); - return hres; + return FAILED(hres) ? hres : S_OK; }
nsAString_InitDepend(&nsfrag_str, frag); @@ -2236,7 +2239,7 @@ HRESULT super_navigate(HTMLOuterWindow *window, IUri *uri, DWORD flags, const WC prepare_for_binding(&window->browser->doc->basedoc, mon, flags);
hres = IUri_GetScheme(uri, &scheme); - if(SUCCEEDED(hres) && scheme == URL_SCHEME_JAVASCRIPT) { + if(hres == S_OK && scheme == URL_SCHEME_JAVASCRIPT) { navigate_javascript_task_t *task;
IBindStatusCallback_Release(&bsc->bsc.IBindStatusCallback_iface);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Mostly by setting such strings to NULL, because the component does not exist.
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/nsio.c | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index f1859e2a383..1a48925ff77 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -168,6 +168,11 @@ static nsresult return_wstr_nsacstr(nsACString *ret_str, const WCHAR *str, int l
TRACE("returning %s\n", debugstr_wn(str, len));
+ if(!str) { + nsACString_SetData(ret_str, NULL); + return NS_OK; + } + if(!*str) { nsACString_SetData(ret_str, ""); return NS_OK; @@ -1255,10 +1260,10 @@ static nsresult NSAPI nsChannel_SetReferrerWithPolicy(nsIHttpChannel *iface, nsI return NS_ERROR_UNEXPECTED; }
- if(!ensure_uri(This->uri) || FAILED(IUri_GetScheme(This->uri->uri, &channel_scheme))) + if(!ensure_uri(This->uri) || IUri_GetScheme(This->uri->uri, &channel_scheme) != S_OK) channel_scheme = INTERNET_SCHEME_UNKNOWN;
- if(FAILED(IUri_GetScheme(referrer->uri, &referrer_scheme))) + if(IUri_GetScheme(referrer->uri, &referrer_scheme) != S_OK) referrer_scheme = INTERNET_SCHEME_UNKNOWN;
if(referrer_scheme == INTERNET_SCHEME_HTTPS && channel_scheme != INTERNET_SCHEME_HTTPS) { @@ -2291,9 +2296,9 @@ static nsresult get_uri_string(nsWineURI *This, Uri_PROPERTY prop, nsACString *r return NS_ERROR_UNEXPECTED; }
- vala = heap_strdupWtoU(val); + vala = heap_strdupWtoU(hres == S_OK ? val : NULL); SysFreeString(val); - if(!vala) + if(hres == S_OK && !vala) return NS_ERROR_OUT_OF_MEMORY;
TRACE("ret %s\n", debugstr_a(vala)); @@ -2652,7 +2657,7 @@ static nsresult NSAPI nsURI_SetPassword(nsIFileURL *iface, const nsACString *aPa static nsresult NSAPI nsURI_GetHostPort(nsIFileURL *iface, nsACString *aHostPort) { nsWineURI *This = impl_from_nsIFileURL(iface); - const WCHAR *ptr; + const WCHAR *ptr = NULL; char *vala; BSTR val; HRESULT hres; @@ -2668,13 +2673,14 @@ static nsresult NSAPI nsURI_GetHostPort(nsIFileURL *iface, nsACString *aHostPort return NS_ERROR_UNEXPECTED; }
- ptr = wcschr(val, '@'); - if(!ptr) - ptr = val; - + if(hres == S_OK) { + ptr = wcschr(val, '@'); + if(!ptr) + ptr = val; + } vala = heap_strdupWtoU(ptr); SysFreeString(val); - if(!vala) + if(hres == S_OK && !vala) return NS_ERROR_OUT_OF_MEMORY;
TRACE("ret %s\n", debugstr_a(vala)); @@ -2846,8 +2852,12 @@ static nsresult NSAPI nsURI_SchemeIs(nsIFileURL *iface, const char *scheme, cpp_ if(FAILED(hres)) return NS_ERROR_UNEXPECTED;
- MultiByteToWideChar(CP_UTF8, 0, scheme, -1, buf, ARRAY_SIZE(buf)); - *_retval = !wcscmp(scheme_name, buf); + if(hres != S_OK) + *_retval = FALSE; + else { + MultiByteToWideChar(CP_UTF8, 0, scheme, -1, buf, ARRAY_SIZE(buf)); + *_retval = !wcscmp(scheme_name, buf); + } SysFreeString(scheme_name); return NS_OK; } @@ -3167,6 +3177,11 @@ static nsresult get_uri_path(nsWineURI *This, BSTR *path, const WCHAR **file, co hres = IUri_GetPath(This->uri, path); if(FAILED(hres)) return NS_ERROR_FAILURE; + if(hres != S_OK) { + SysFreeString(*path); + *ext = *file = *path = NULL; + return NS_OK; + }
for(ptr = *path + SysStringLen(*path)-1; ptr > *path && *ptr != '/' && *ptr != '\'; ptr--); if(*ptr == '/' || *ptr == '\') @@ -3458,7 +3473,7 @@ static nsresult create_nsuri(IUri *iuri, nsWineURI **_retval) ret->uri = iuri;
hres = IUri_GetScheme(iuri, &ret->scheme); - if(FAILED(hres)) + if(hres != S_OK) ret->scheme = URL_SCHEME_UNKNOWN;
TRACE("retval=%p\n", ret);
From: Gabriel Ivăncescu gabrielopcode@gmail.com
Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/mshtml/main.c | 6 ++++-- dlls/mshtml/persist.c | 3 ++- dlls/mshtml/script.c | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/main.c b/dlls/mshtml/main.c index 1a64bdb9b7d..26c689ea016 100644 --- a/dlls/mshtml/main.c +++ b/dlls/mshtml/main.c @@ -215,7 +215,7 @@ compat_mode_t get_max_compat_mode(IUri *uri) { compat_config_t *iter; size_t len, iter_len; - BSTR host; + BSTR host = NULL; HRESULT hres;
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT; @@ -224,8 +224,10 @@ compat_mode_t get_max_compat_mode(IUri *uri) if(!uri) return global_max_compat_mode; hres = IUri_GetHost(uri, &host); - if(FAILED(hres)) + if(hres != S_OK) { + SysFreeString(host); return global_max_compat_mode; + } len = SysStringLen(host);
LIST_FOR_EACH_ENTRY(iter, &compat_config, compat_config_t, entry) { diff --git a/dlls/mshtml/persist.c b/dlls/mshtml/persist.c index 73f255e753d..49e78ecfbc2 100644 --- a/dlls/mshtml/persist.c +++ b/dlls/mshtml/persist.c @@ -1176,7 +1176,8 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L if (FAILED(hres)) return hres;
- ShellExecuteW(NULL, L"open", uri, NULL, NULL, SW_SHOW); + if(hres == S_OK) + ShellExecuteW(NULL, L"open", uri, NULL, NULL, SW_SHOW); SysFreeString(uri); return S_OK; } diff --git a/dlls/mshtml/script.c b/dlls/mshtml/script.c index 769ca72db6f..44211a6e0f2 100644 --- a/dlls/mshtml/script.c +++ b/dlls/mshtml/script.c @@ -1123,7 +1123,7 @@ HRESULT load_script(HTMLScriptElement *script_elem, const WCHAR *src, BOOL async
hres = IUri_GetScheme(uri, &bsc->scheme); IUri_Release(uri); - if(FAILED(hres)) + if(hres != S_OK) bsc->scheme = URL_SCHEME_UNKNOWN;
IHTMLScriptElement_AddRef(&script_elem->IHTMLScriptElement_iface);
This merge request was approved by Jacek Caban.