From 892be572cbf3724b92e6a4d2545b6fd0f94d258c Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 14 Mar 2019 14:13:06 +0100 Subject: [PATCH] mshtml: Access document object via browser object in nsIChannel::AsyncOpen. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- dlls/mshtml/nsio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 7a1d204848c..9b9e57500e9 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -1063,17 +1063,17 @@ static nsresult NSAPI nsChannel_AsyncOpen(nsIHttpChannel *iface, nsIStreamListen cancel = TRUE; } - if(window == window->doc_obj->basedoc.window) { + if(is_main_content_window(window)) { if(!This->uri->channel_bsc) { /* top window navigation initiated by Gecko */ - nsres = before_async_open(This, window->doc_obj->nscontainer, &cancel); + nsres = before_async_open(This, window->browser, &cancel); if(NS_SUCCEEDED(nsres) && cancel) { TRACE("canceled\n"); nsres = NS_BINDING_ABORTED; } - }else if(window->doc_obj->mime) { + }else if(window->browser->doc->mime) { heap_free(This->content_type); - This->content_type = heap_strdupWtoA(window->doc_obj->mime); + This->content_type = heap_strdupWtoA(window->browser->doc->mime); } } }