Title: [248336] trunk
Revision
248336
Author
[email protected]
Date
2019-08-06 18:44:55 -0700 (Tue, 06 Aug 2019)

Log Message

ASSERTION FAILED: m_observers.isEmpty() if WKPageSetPageStateClient is used
https://bugs.webkit.org/show_bug.cgi?id=200465

Reviewed by Alex Christensen.

Source/WebKit:

PageLoadState::Observer should be removed before destructing
WebPageProxy.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::~WebPageProxy): Call
setPageLoadStateObserver with nullptr to remove
PageLoadState::Observer.

Tools:

* TestWebKitAPI/Tests/WebKit/PageLoadState.cpp:
(TestWebKitAPI::WebKit.PageLoadState): Set PageStateClient before
finishing the test.
* TestWebKitAPI/win/PlatformWebViewWin.cpp:
(TestWebKitAPI::PlatformWebView::~PlatformWebView): Release m_view.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248335 => 248336)


--- trunk/Source/WebKit/ChangeLog	2019-08-07 01:16:22 UTC (rev 248335)
+++ trunk/Source/WebKit/ChangeLog	2019-08-07 01:44:55 UTC (rev 248336)
@@ -1,3 +1,18 @@
+2019-08-06  Fujii Hironori  <[email protected]>
+
+        ASSERTION FAILED: m_observers.isEmpty() if WKPageSetPageStateClient is used
+        https://bugs.webkit.org/show_bug.cgi?id=200465
+
+        Reviewed by Alex Christensen.
+
+        PageLoadState::Observer should be removed before destructing
+        WebPageProxy.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::~WebPageProxy): Call
+        setPageLoadStateObserver with nullptr to remove
+        PageLoadState::Observer.
+
 2019-08-06  Chris Dumez  <[email protected]>
 
         Add release assertions to help catch a bug in our WebProcessCache implementation

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (248335 => 248336)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-08-07 01:16:22 UTC (rev 248335)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2019-08-07 01:44:55 UTC (rev 248336)
@@ -500,6 +500,8 @@
         ASSERT(page != this);
 #endif
 
+    setPageLoadStateObserver(nullptr);
+
     if (!m_isClosed)
         close();
 

Modified: trunk/Tools/ChangeLog (248335 => 248336)


--- trunk/Tools/ChangeLog	2019-08-07 01:16:22 UTC (rev 248335)
+++ trunk/Tools/ChangeLog	2019-08-07 01:44:55 UTC (rev 248336)
@@ -1,3 +1,16 @@
+2019-08-06  Fujii Hironori  <[email protected]>
+
+        ASSERTION FAILED: m_observers.isEmpty() if WKPageSetPageStateClient is used
+        https://bugs.webkit.org/show_bug.cgi?id=200465
+
+        Reviewed by Alex Christensen.
+
+        * TestWebKitAPI/Tests/WebKit/PageLoadState.cpp:
+        (TestWebKitAPI::WebKit.PageLoadState): Set PageStateClient before
+        finishing the test.
+        * TestWebKitAPI/win/PlatformWebViewWin.cpp:
+        (TestWebKitAPI::PlatformWebView::~PlatformWebView): Release m_view.
+
 2019-08-06  Jiewen Tan  <[email protected]>
 
         Unreviewed, a build fix after r248308

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp (248335 => 248336)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp	2019-08-07 01:16:22 UTC (rev 248335)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/PageLoadState.cpp	2019-08-07 01:44:55 UTC (rev 248336)
@@ -295,6 +295,8 @@
     Util::run(&test1Done);
 
     EXPECT_EQ(state.didChangeActiveURL, 4);
+
+    WKPageSetPageStateClient(webView.page(), &stateClient.base);
 }
 
 } // namespace TestWebKitAPI

Modified: trunk/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp (248335 => 248336)


--- trunk/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp	2019-08-07 01:16:22 UTC (rev 248335)
+++ trunk/Tools/TestWebKitAPI/win/PlatformWebViewWin.cpp	2019-08-07 01:44:55 UTC (rev 248336)
@@ -93,6 +93,7 @@
 PlatformWebView::~PlatformWebView()
 {
     ::DestroyWindow(m_window);
+    WKRelease(m_view);
 }
 
 WKPageRef PlatformWebView::page() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to