Diff
Modified: trunk/Source/WebKit2/ChangeLog (213759 => 213760)
--- trunk/Source/WebKit2/ChangeLog 2017-03-11 16:44:00 UTC (rev 213759)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-11 18:03:46 UTC (rev 213760)
@@ -1,3 +1,19 @@
+2017-03-11 Alex Christensen <[email protected]>
+
+ Rollout r213746
+ https://bugs.webkit.org/show_bug.cgi?id=169497
+
+ That change broke a bunch of tests in storage/indexeddb.
+
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::initializeNetworkProcess):
+ (WebKit::NetworkProcess::ensurePrivateBrowsingSession):
+ * NetworkProcess/RemoteNetworkingContext.h:
+ * NetworkProcess/mac/RemoteNetworkingContext.mm:
+ (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
+ * NetworkProcess/soup/RemoteNetworkingContextSoup.cpp: Copied from WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp.
+ * PlatformGTK.cmake:
+
2017-03-11 Brady Eidson <[email protected]>
Cleanup "addCookie" and its sole user.
Modified: trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp (213759 => 213760)
--- trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2017-03-11 16:44:00 UTC (rev 213759)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkProcess.cpp 2017-03-11 18:03:46 UTC (rev 213760)
@@ -232,11 +232,9 @@
setCanHandleHTTPSServerTrustEvaluation(parameters.canHandleHTTPSServerTrustEvaluation);
-#if !USE(NETWORK_SESSION)
// FIXME: instead of handling this here, a message should be sent later (scales to multiple sessions)
if (parameters.privateBrowsingEnabled)
RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID::legacyPrivateSessionID());
-#endif
if (parameters.shouldUseTestingNetworkSession)
NetworkStorageSession::switchToNewTestingSession();
@@ -289,9 +287,7 @@
void NetworkProcess::ensurePrivateBrowsingSession(SessionID sessionID)
{
-#if !USE(NETWORK_SESSION)
RemoteNetworkingContext::ensurePrivateBrowsingSession(sessionID);
-#endif
}
void NetworkProcess::destroyPrivateBrowsingSession(SessionID sessionID)
Modified: trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h (213759 => 213760)
--- trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h 2017-03-11 16:44:00 UTC (rev 213759)
+++ trunk/Source/WebKit2/NetworkProcess/RemoteNetworkingContext.h 2017-03-11 18:03:46 UTC (rev 213760)
@@ -24,13 +24,12 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#pragma once
+#ifndef RemoteNetworkingContext_h
+#define RemoteNetworkingContext_h
#include <WebCore/NetworkingContext.h>
#include <WebCore/SessionID.h>
-#if !USE(NETWORK_SESSION)
-
namespace WebKit {
class RemoteNetworkingContext final : public WebCore::NetworkingContext {
@@ -74,4 +73,4 @@
}
-#endif
+#endif // RemoteNetworkingContext_h
Modified: trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm (213759 => 213760)
--- trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm 2017-03-11 16:44:00 UTC (rev 213759)
+++ trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm 2017-03-11 18:03:46 UTC (rev 213760)
@@ -36,12 +36,11 @@
#import <WebKitSystemInterface.h>
#import <wtf/MainThread.h>
-#if !USE(NETWORK_SESSION)
-
using namespace WebCore;
namespace WebKit {
+
RemoteNetworkingContext::~RemoteNetworkingContext()
{
}
@@ -94,8 +93,11 @@
base = SessionTracker::getIdentifierBase();
NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, base + '.' + String::number(sessionID.sessionID()));
+
+#if USE(NETWORK_SESSION)
+ auto networkSession = NetworkSession::create(sessionID, NetworkProcess::singleton().supplement<LegacyCustomProtocolManager>());
+ SessionTracker::setSession(sessionID, WTFMove(networkSession));
+#endif
}
}
-
-#endif
Copied: trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (from rev 213745, trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp) (0 => 213760)
--- trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp (rev 0)
+++ trunk/Source/WebKit2/NetworkProcess/soup/RemoteNetworkingContextSoup.cpp 2017-03-11 18:03:46 UTC (rev 213760)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2013 Apple Inc. All rights reserved.
+ * Copyright (C) 2013 University of Szeged. All rights reserved.
+ * Copyright (C) 2013 Company 100 Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "RemoteNetworkingContext.h"
+
+#include "NetworkSession.h"
+#include "SessionTracker.h"
+#include <WebCore/NetworkStorageSession.h>
+#include <WebCore/NotImplemented.h>
+#include <WebCore/ResourceHandle.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+RemoteNetworkingContext::~RemoteNetworkingContext()
+{
+}
+
+bool RemoteNetworkingContext::isValid() const
+{
+ return true;
+}
+
+void RemoteNetworkingContext::ensurePrivateBrowsingSession(SessionID sessionID)
+{
+ ASSERT(sessionID.isEphemeral());
+
+ if (NetworkStorageSession::storageSession(sessionID))
+ return;
+
+ NetworkStorageSession::ensurePrivateBrowsingSession(sessionID, String::number(sessionID.sessionID()));
+ SessionTracker::setSession(sessionID, NetworkSession::create(sessionID));
+}
+
+NetworkStorageSession& RemoteNetworkingContext::storageSession() const
+{
+ if (auto session = NetworkStorageSession::storageSession(m_sessionID))
+ return *session;
+ return NetworkStorageSession::defaultStorageSession();
+}
+
+}
Modified: trunk/Source/WebKit2/PlatformGTK.cmake (213759 => 213760)
--- trunk/Source/WebKit2/PlatformGTK.cmake 2017-03-11 16:44:00 UTC (rev 213759)
+++ trunk/Source/WebKit2/PlatformGTK.cmake 2017-03-11 18:03:46 UTC (rev 213760)
@@ -40,6 +40,7 @@
NetworkProcess/soup/NetworkProcessMainSoup.cpp
NetworkProcess/soup/NetworkProcessSoup.cpp
NetworkProcess/soup/NetworkSessionSoup.cpp
+ NetworkProcess/soup/RemoteNetworkingContextSoup.cpp
Platform/IPC/glib/GSocketMonitor.cpp
Platform/IPC/unix/AttachmentUnix.cpp