browser(webkit): fix process swap related error message in WPE (#14263)
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 in5a3fae4c5aas 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:fc28e40f36
This commit is contained in:
parent
738d5e5b3e
commit
92c02fcaff
|
|
@ -1,2 +1,2 @@
|
||||||
1646
|
1647
|
||||||
Changed: yurys@chromium.org Wed 18 May 2022 11:31:37 AM PDT
|
Changed: yurys@chromium.org Wed 18 May 2022 11:49:45 AM PDT
|
||||||
|
|
|
||||||
|
|
@ -17738,10 +17738,10 @@ index b5e48e6c61a8a3f4b40b84112c4010101c4d5f41..46747b1d78bfe0270178609867c0d710
|
||||||
};
|
};
|
||||||
diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
|
diff --git a/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..37e6a825ecbf941f66013044b2b5fc3a7749c7e4
|
index 0000000000000000000000000000000000000000..20a7cd2c65be39b3bcab356f6eee0b82d084c6bf
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
|
+++ b/Source/WebKit/UIProcess/glib/InspectorPlaywrightAgentClientGLib.cpp
|
||||||
@@ -0,0 +1,147 @@
|
@@ -0,0 +1,152 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (C) 2019 Microsoft Corporation.
|
+ * Copyright (C) 2019 Microsoft Corporation.
|
||||||
+ *
|
+ *
|
||||||
|
|
@ -17861,7 +17861,12 @@ index 0000000000000000000000000000000000000000..37e6a825ecbf941f66013044b2b5fc3a
|
||||||
+std::unique_ptr<BrowserContext> InspectorPlaywrightAgentClientGlib::createBrowserContext(WTF::String& error, const WTF::String& proxyServer, const WTF::String& proxyBypassList)
|
+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<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) {
|
+ if (!context) {
|
||||||
+ error = "Failed to create GLib ephemeral context"_s;
|
+ error = "Failed to create GLib ephemeral context"_s;
|
||||||
+ return nullptr;
|
+ return nullptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue