Skip to content

Commit 71dbb9f

Browse files
committed
fix: don't leak pages on window.open
1 parent 2442946 commit 71dbb9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class UIClient : public API::UIClient {
6464
void createNewPage(WebPageProxy& page, WebCore::WindowFeatures&& windowFeatures, Ref<API::NavigationAction>&& apiNavigationAction, CompletionHandler<void(RefPtr<WebPageProxy>&&)>&& completionHandler) final
6565
{
6666
WebKitNavigationAction navigationAction(WTFMove(apiNavigationAction));
67-
completionHandler(webkitWebViewCreateNewPage(m_webView, windowFeatures, &navigationAction));
67+
WebPageProxy* newPage = webkitWebViewCreateNewPage(m_webView, windowFeatures, &navigationAction);
68+
completionHandler(adoptRef(newPage));
6869
}
6970

7071
void showPage(WebPageProxy*) final

0 commit comments

Comments
 (0)