Title: [211014] trunk/Source
Revision
211014
Author
[email protected]
Date
2017-01-21 01:22:39 -0800 (Sat, 21 Jan 2017)

Log Message

Unreviewed, rolling out r211012.

It caused a lot of crashes in the network process

Reverted changeset:

"[SOUP] Custom protocols don't work in private browsing mode"
https://bugs.webkit.org/show_bug.cgi?id=167236
http://trac.webkit.org/changeset/211012

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (211013 => 211014)


--- trunk/Source/WebCore/ChangeLog	2017-01-21 07:52:20 UTC (rev 211013)
+++ trunk/Source/WebCore/ChangeLog	2017-01-21 09:22:39 UTC (rev 211014)
@@ -1,3 +1,15 @@
+2017-01-21  Carlos Garcia Campos  <[email protected]>
+
+        Unreviewed, rolling out r211012.
+
+        It caused a lot of crashes in the network process
+
+        Reverted changeset:
+
+        "[SOUP] Custom protocols don't work in private browsing mode"
+        https://bugs.webkit.org/show_bug.cgi?id=167236
+        http://trac.webkit.org/changeset/211012
+
 2017-01-20  Joseph Pecoraro  <[email protected]>
 
         Remove never changing IndexedDB RuntimeEnabledFeature

Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp (211013 => 211014)


--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2017-01-21 07:52:20 UTC (rev 211013)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp	2017-01-21 09:22:39 UTC (rev 211014)
@@ -48,7 +48,6 @@
 static bool gIgnoreTLSErrors;
 static CString gInitialAcceptLanguages;
 static SoupNetworkProxySettings gProxySettings;
-static GType gCustomProtocolRequestType;
 
 #if !LOG_DISABLED
 inline static void soupLogPrinter(SoupLogger*, SoupLoggerLogLevel, char direction, const char* data, gpointer)
@@ -141,8 +140,6 @@
         SOUP_SESSION_SSL_STRICT, FALSE,
         nullptr);
 
-    setupCustomProtocols();
-
     if (!gInitialAcceptLanguages.isNull())
         setAcceptLanguages(gInitialAcceptLanguages);
 
@@ -292,19 +289,6 @@
     g_object_set(m_soupSession.get(), "accept-language", languages.data(), nullptr);
 }
 
-void SoupNetworkSession::setCustomProtocolRequestType(GType requestType)
-{
-    ASSERT(g_type_is_a(requestType, SOUP_TYPE_REQUEST));
-    gCustomProtocolRequestType = requestType;
-}
-
-void SoupNetworkSession::setupCustomProtocols()
-{
-    if (!g_type_is_a(gCustomProtocolRequestType, SOUP_TYPE_REQUEST))
-        return;
-    soup_session_add_feature_by_type(m_soupSession.get(), gCustomProtocolRequestType);
-}
-
 void SoupNetworkSession::setShouldIgnoreTLSErrors(bool ignoreTLSErrors)
 {
     gIgnoreTLSErrors = ignoreTLSErrors;

Modified: trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h (211013 => 211014)


--- trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h	2017-01-21 07:52:20 UTC (rev 211013)
+++ trunk/Source/WebCore/platform/network/soup/SoupNetworkSession.h	2017-01-21 09:22:39 UTC (rev 211014)
@@ -32,7 +32,6 @@
 #include <wtf/glib/GRefPtr.h>
 #include <wtf/text/WTFString.h>
 
-typedef size_t GType;
 typedef struct _SoupCache SoupCache;
 typedef struct _SoupCookieJar SoupCookieJar;
 typedef struct _SoupMessage SoupMessage;
@@ -71,9 +70,6 @@
     static void checkTLSErrors(SoupRequest*, SoupMessage*, std::function<void (const ResourceError&)>&&);
     static void allowSpecificHTTPSCertificateForHost(const CertificateInfo&, const String& host);
 
-    static void setCustomProtocolRequestType(GType);
-    void setupCustomProtocols();
-
 private:
     void setupLogger();
 

Modified: trunk/Source/WebKit2/ChangeLog (211013 => 211014)


--- trunk/Source/WebKit2/ChangeLog	2017-01-21 07:52:20 UTC (rev 211013)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-21 09:22:39 UTC (rev 211014)
@@ -1,3 +1,15 @@
+2017-01-21  Carlos Garcia Campos  <[email protected]>
+
+        Unreviewed, rolling out r211012.
+
+        It caused a lot of crashes in the network process
+
+        Reverted changeset:
+
+        "[SOUP] Custom protocols don't work in private browsing mode"
+        https://bugs.webkit.org/show_bug.cgi?id=167236
+        http://trac.webkit.org/changeset/211012
+
 2017-01-20  Joseph Pecoraro  <[email protected]>
 
         Remove never changing IndexedDB RuntimeEnabledFeature

Modified: trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp (211013 => 211014)


--- trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp	2017-01-21 07:52:20 UTC (rev 211013)
+++ trunk/Source/WebKit2/NetworkProcess/CustomProtocols/soup/CustomProtocolManagerSoup.cpp	2017-01-21 09:22:39 UTC (rev 211014)
@@ -77,11 +77,6 @@
 void CustomProtocolManager::registerProtocolClass()
 {
     static_cast<WebKitSoupRequestGenericClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC))->client = &CustomProtocolRequestClient::singleton();
-    SoupNetworkSession::setCustomProtocolRequestType(WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
-    NetworkStorageSession::forEach([](const WebCore::NetworkStorageSession& session) {
-        if (auto* soupSession = session.soupNetworkSession())
-            soupSession->setupCustomProtocols();
-    });
 }
 
 void CustomProtocolManager::registerScheme(const String& scheme)
@@ -94,9 +89,9 @@
     g_ptr_array_add(m_registeredSchemes.get(), g_strdup(scheme.utf8().data()));
     g_ptr_array_add(m_registeredSchemes.get(), nullptr);
 
-    auto* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_peek(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
-    ASSERT(genericRequestClass);
+    auto* genericRequestClass = static_cast<SoupRequestClass*>(g_type_class_ref(WEBKIT_TYPE_SOUP_REQUEST_GENERIC));
     genericRequestClass->schemes = const_cast<const char**>(reinterpret_cast<char**>(m_registeredSchemes->pdata));
+    soup_session_add_feature_by_type(NetworkStorageSession::defaultStorageSession().getOrCreateSoupNetworkSession().soupSession(), WEBKIT_TYPE_SOUP_REQUEST_GENERIC);
 }
 
 void CustomProtocolManager::unregisterScheme(const String&)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to