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);