[WPE] Page should be closed on WebKitWebView dispose
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jun 2017 11:16:54 +0000 (11:16 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 22 Jun 2017 11:16:54 +0000 (11:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173707

Reviewed by Žan Doberšek.

In the GTK+ port it's done in the WebKitWebViewBase dispose implementation. It fixes TestMultiprocess.

* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewDispose): Call WKWPE::View::close().
* UIProcess/API/wpe/WPEView.cpp:
(WKWPE::View::close): Close the WebPageProxy.
* UIProcess/API/wpe/WPEView.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218688 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit2/UIProcess/API/wpe/WPEView.cpp
Source/WebKit2/UIProcess/API/wpe/WPEView.h

index d3b3f35..2f45c61 100644 (file)
@@ -1,5 +1,20 @@
 2017-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        [WPE] Page should be closed on WebKitWebView dispose
+        https://bugs.webkit.org/show_bug.cgi?id=173707
+
+        Reviewed by Žan Doberšek.
+
+        In the GTK+ port it's done in the WebKitWebViewBase dispose implementation. It fixes TestMultiprocess.
+
+        * UIProcess/API/glib/WebKitWebView.cpp:
+        (webkitWebViewDispose): Call WKWPE::View::close().
+        * UIProcess/API/wpe/WPEView.cpp:
+        (WKWPE::View::close): Close the WebPageProxy.
+        * UIProcess/API/wpe/WPEView.h:
+
+2017-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         Remove unused coordinated graphics C API
         https://bugs.webkit.org/show_bug.cgi?id=173706
 
index 713ff88..345cdb1 100644 (file)
@@ -736,6 +736,10 @@ static void webkitWebViewDispose(GObject* object)
         webView->priv->websiteDataManager = nullptr;
     }
 
+#if PLATFORM(WPE)
+    webView->priv->view->close();
+#endif
+
     G_OBJECT_CLASS(webkit_web_view_parent_class)->dispose(object);
 }
 
index b6a98cf..2f67f04 100644 (file)
@@ -158,4 +158,9 @@ void View::setViewState(WebCore::ActivityState::Flags flags)
         m_pageProxy->activityStateDidChange(changedFlags);
 }
 
+void View::close()
+{
+    m_pageProxy->close();
+}
+
 } // namespace WKWPE
index 19f20f5..dc6160e 100644 (file)
@@ -64,6 +64,8 @@ public:
     WebCore::ActivityState::Flags viewState() const { return m_viewStateFlags; }
     void setViewState(WebCore::ActivityState::Flags);
 
+    void close();
+
 private:
     View(struct wpe_view_backend*, const API::PageConfiguration&);