Skip to content

Commit

Permalink
browser(webkit): fix process swap related error message in WPE (#14263)
Browse files Browse the repository at this point in the history
This PR fixes the following error message in WPE:
```
[pid=506430][err] (MiniBrowser:506435): GLib-GObject-CRITICAL **: 11:47:23.538: g_object_new_is_valid_property: object class 'WebKitWebContext' has no property named 'process-swap-on-cross-site-navigation-enabled' +0ms
```

Our changes to WPE port that added support for the parameter were removed in 5a3fae4 as PSON is enabled by default in WPE (see https://bugs.webkit.org/show_bug.cgi?id=240052) and we don't need to set this explicitly in our fork.

Pretty diff: yury-s/WebKit@fc28e40
  • Loading branch information
yury-s authored May 18, 2022
1 parent 738d5e5 commit 92c02fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
4 changes: 2 additions & 2 deletions browser_patches/webkit/BUILD_NUMBER
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
1646
Changed: [email protected] Wed 18 May 2022 11:31:37 AM PDT
1647
Changed: [email protected] Wed 18 May 2022 11:49:45 AM PDT
11 changes: 8 additions & 3 deletions browser_patches/webkit/patches/bootstrap.diff
Original file line number Diff line number Diff line change
Expand Up @@ -17738,10 +17738,10 @@ index b5e48e6c61a8a3f4b40b84112c4010101c4d5f41..46747b1d78bfe0270178609867c0d710
};
diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..37e6a825ecbf941f66013044b2b5fc3a7749c7e4
index 0000000000000000000000000000000000000000..20a7cd2c65be39b3bcab356f6eee0b82d084c6bf
--- /dev/null
+++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
@@ -0,0 +1,147 @@
@@ -0,0 +1,152 @@
+/*
+ * Copyright (C) 2019 Microsoft Corporation.
+ *
Expand Down Expand Up @@ -17861,7 +17861,12 @@ index 0000000000000000000000000000000000000000..37e6a825ecbf941f66013044b2b5fc3a
+std::unique_ptr<BrowserContext> InspectorPlaywrightAgentClientGlib::createBrowserContext(WTF::String& error, const WTF::String& proxyServer, const WTF::String& proxyBypassList)
+{
+ GRefPtr<WebKitWebsiteDataManager> data_manager = adoptGRef(webkit_website_data_manager_new_ephemeral());
+ GRefPtr<WebKitWebContext> context = adoptGRef(WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "website-data-manager", data_manager.get(), "process-swap-on-cross-site-navigation-enabled", true, nullptr)));
+ GRefPtr<WebKitWebContext> context = adoptGRef(WEBKIT_WEB_CONTEXT(g_object_new(WEBKIT_TYPE_WEB_CONTEXT, "website-data-manager", data_manager.get(),
+ // WPE has PSON enabled by default and doesn't have such parameter.
+#if PLATFORM(GTK)
+ "process-swap-on-cross-site-navigation-enabled", true,
+#endif
+ nullptr)));
+ if (!context) {
+ error = "Failed to create GLib ephemeral context"_s;
+ return nullptr;
Expand Down

0 comments on commit 92c02fc

Please sign in to comment.