Commit e5fe3bc0 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Handle S_FALSE from IUri methods when navigating.

Mostly by ignoring it, since no such Uri component exists. Signed-off-by: 's avatarGabriel Ivăncescu <gabrielopcode@gmail.com>
parent d2daec40
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment