Skip to content

Commit 9c80c9e

Browse files
browser(webkit): don't leak pages on window.open (#1261)
1 parent 1d770af commit 9c80c9e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

browser_patches/webkit/BUILD_NUMBER

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1168
1+
1169

browser_patches/webkit/patches/bootstrap.diff

+12-2
Original file line numberDiff line numberDiff line change
@@ -6131,10 +6131,20 @@ index 0000000000000000000000000000000000000000..1bff4e694f19264d1be418198b792178
61316131
+
61326132
+WebKit::WebPageProxy* webkitBrowserInspectorCreateNewPageInContext(WebKitWebContext*);
61336133
diff --git a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
6134-
index f769407fdc660c6f6fef77af90a43bd5dca9d544..ba010ed593bdedc0d70e4f4d3139e73d3c395463 100644
6134+
index f769407fdc660c6f6fef77af90a43bd5dca9d544..bee8a907fb9a7924d9551d9aa64d98fb8c5746de 100644
61356135
--- a/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
61366136
+++ b/Source/WebKit/UIProcess/API/glib/WebKitUIClient.cpp
6137-
@@ -91,6 +91,10 @@ private:
6137+
@@ -64,7 +64,8 @@ private:
6138+
void createNewPage(WebPageProxy& page, WebCore::WindowFeatures&& windowFeatures, Ref<API::NavigationAction>&& apiNavigationAction, CompletionHandler<void(RefPtr<WebPageProxy>&&)>&& completionHandler) final
6139+
{
6140+
WebKitNavigationAction navigationAction(WTFMove(apiNavigationAction));
6141+
- completionHandler(webkitWebViewCreateNewPage(m_webView, windowFeatures, &navigationAction));
6142+
+ WebPageProxy* newPage = webkitWebViewCreateNewPage(m_webView, windowFeatures, &navigationAction);
6143+
+ completionHandler(adoptRef(newPage));
6144+
}
6145+
6146+
void showPage(WebPageProxy*) final
6147+
@@ -91,6 +92,10 @@ private:
61386148
{
61396149
webkitWebViewRunJavaScriptPrompt(m_webView, message.utf8(), defaultValue.utf8(), WTFMove(completionHandler));
61406150
}

0 commit comments

Comments
 (0)