Jacek Caban : mshtml: Access document object via browser object in handle_navigation_error and handle_extern_mime_navigation.

Alexandre Julliard julliard at winehq.org
Thu Mar 14 18:33:21 CDT 2019


Module: wine
Branch: master
Commit: 5ba17254916a891cc0b33a5cd4bdf25afcd0c847
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5ba17254916a891cc0b33a5cd4bdf25afcd0c847

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Mar 14 14:13:54 2019 +0100

mshtml: Access document object via browser object in handle_navigation_error and handle_extern_mime_navigation.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mshtml/navigate.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/mshtml/navigate.c b/dlls/mshtml/navigate.c
index 05b8ec0..be83c81 100644
--- a/dlls/mshtml/navigate.c
+++ b/dlls/mshtml/navigate.c
@@ -1394,13 +1394,13 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result)
     BSTR unk;
     HRESULT hres;
 
-    if(!This->is_doc_channel || !This->bsc.window)
+    if(!This->is_doc_channel || !This->bsc.window || !This->bsc.window->base.outer_window
+       || !This->bsc.window->base.outer_window->browser)
         return;
 
     outer_window = This->bsc.window->base.outer_window;
-
-    doc = outer_window->doc_obj;
-    if(!doc || !doc->doc_object_service || !doc->client)
+    doc = outer_window->browser->doc;
+    if(!doc->doc_object_service || !doc->client)
         return;
 
     hres = IDocObjectService_IsErrorUrl(doc->doc_object_service,
@@ -1590,10 +1590,10 @@ static void handle_extern_mime_navigation(nsChannelBSC *This)
     VARIANT flags;
     HRESULT hres;
 
-    if(!This->bsc.window || !This->bsc.window->base.outer_window || !This->bsc.window->base.outer_window->doc_obj)
+    if(!This->bsc.window || !This->bsc.window->base.outer_window || !This->bsc.window->base.outer_window->browser)
         return;
 
-    doc_obj = This->bsc.window->base.outer_window->doc_obj;
+    doc_obj = This->bsc.window->base.outer_window->browser->doc;
 
     hres = IOleClientSite_QueryInterface(doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
     if(SUCCEEDED(hres)) {




More information about the wine-cvs mailing list