Diff
Modified: trunk/Source/WebKit/ChangeLog (263037 => 263038)
--- trunk/Source/WebKit/ChangeLog 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/ChangeLog 2020-06-15 15:44:40 UTC (rev 263038)
@@ -1,3 +1,42 @@
+2020-06-15 Chris Dumez <[email protected]>
+
+ Revert r260856 as it seems to have regressed PLT on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=213194
+ <rdar://problem/64331458>
+
+ Unreviewed, revert r260856 due to regression.
+
+ * NetworkProcess/NetworkProcess.cpp:
+ (WebKit::NetworkProcess::NetworkProcess):
+ (WebKit::NetworkProcess::prepareToSuspend):
+ (WebKit::NetworkProcess::resume):
+ * NetworkProcess/NetworkProcess.h:
+ * Shared/WebSQLiteDatabaseTracker.cpp: Added.
+ (WebKit::WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker):
+ (WebKit::WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker):
+ (WebKit::WebSQLiteDatabaseTracker::setIsSuspended):
+ (WebKit::WebSQLiteDatabaseTracker::willBeginFirstTransaction):
+ (WebKit::WebSQLiteDatabaseTracker::didFinishLastTransaction):
+ (WebKit::WebSQLiteDatabaseTracker::setIsHoldingLockedFiles):
+ * Shared/WebSQLiteDatabaseTracker.h: Added.
+ * SourcesCocoa.txt:
+ * UIProcess/Network/NetworkProcessProxy.cpp:
+ (WebKit::NetworkProcessProxy::didClose):
+ (WebKit::NetworkProcessProxy::setIsHoldingLockedFiles):
+ * UIProcess/Network/NetworkProcessProxy.h:
+ * UIProcess/Network/NetworkProcessProxy.messages.in:
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::shutDown):
+ (WebKit::WebProcessProxy::setIsHoldingLockedFiles):
+ * UIProcess/WebProcessProxy.h:
+ * UIProcess/WebProcessProxy.messages.in:
+ * WebKit.xcodeproj/project.pbxproj:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::m_webSQLiteDatabaseTracker):
+ (WebKit::WebProcess::prepareToSuspend):
+ (WebKit::WebProcess::processDidResume):
+ * WebProcess/WebProcess.h:
+
2020-06-15 Carlos Garcia Campos <[email protected]>
[GTK][WPE] Add API to expose UIClient::requestStorageAccessConfirm
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (263037 => 263038)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2020-06-15 15:44:40 UTC (rev 263038)
@@ -151,6 +151,9 @@
#if ENABLE(CONTENT_EXTENSIONS)
, m_networkContentRuleListManager(*this)
#endif
+#if PLATFORM(IOS_FAMILY)
+ , m_webSQLiteDatabaseTracker([this](bool isHoldingLockedFiles) { parentProcessConnection()->send(Messages::NetworkProcessProxy::SetIsHoldingLockedFiles(isHoldingLockedFiles), 0); })
+#endif
, m_messagePortChannelRegistry(createMessagePortChannelRegistry(*this))
{
NetworkProcessPlatformStrategies::initialize();
@@ -2249,9 +2252,13 @@
#if PLATFORM(IOS_FAMILY) && ENABLE(INDEXED_DATABASE)
for (auto& server : m_webIDBServers.values())
- server->suspend(WebIDBServer::ShouldForceStop::Yes);
+ server->suspend(isSuspensionImminent ? WebIDBServer::ShouldForceStop::Yes : WebIDBServer::ShouldForceStop::No);
#endif
+#if PLATFORM(IOS_FAMILY)
+ m_webSQLiteDatabaseTracker.setIsSuspended(true);
+#endif
+
lowMemoryHandler(Critical::Yes);
RefPtr<CallbackAggregator> callbackAggregator = CallbackAggregator::create([this, completionHandler = WTFMove(completionHandler)]() mutable {
@@ -2296,6 +2303,10 @@
void NetworkProcess::resume()
{
+#if PLATFORM(IOS_FAMILY)
+ m_webSQLiteDatabaseTracker.setIsSuspended(false);
+#endif
+
for (auto& connection : m_webProcessConnections.values())
connection->endSuspension();
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.h (263037 => 263038)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.h 2020-06-15 15:44:40 UTC (rev 263038)
@@ -58,6 +58,10 @@
#include <wtf/RetainPtr.h>
#include <wtf/WeakPtr.h>
+#if PLATFORM(IOS_FAMILY)
+#include "WebSQLiteDatabaseTracker.h"
+#endif
+
#if PLATFORM(COCOA)
typedef struct OpaqueCFHTTPCookieStorage* CFHTTPCookieStorageRef;
#endif
@@ -553,6 +557,10 @@
NetworkContentRuleListManager m_networkContentRuleListManager;
#endif
+#if PLATFORM(IOS_FAMILY)
+ WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker;
+#endif
+
Ref<WorkQueue> m_storageTaskQueue { WorkQueue::create("com.apple.WebKit.StorageTask") };
#if ENABLE(INDEXED_DATABASE)
Added: trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp (0 => 263038)
--- trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp (rev 0)
+++ trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.cpp 2020-06-15 15:44:40 UTC (rev 263038)
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * 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 "WebSQLiteDatabaseTracker.h"
+
+#include "NetworkProcess.h"
+#include "NetworkProcessProxyMessages.h"
+#include "WebProcess.h"
+#include "WebProcessProxyMessages.h"
+#include <WebCore/SQLiteDatabaseTracker.h>
+
+namespace WebKit {
+using namespace WebCore;
+
+WebSQLiteDatabaseTracker::WebSQLiteDatabaseTracker(IsHoldingLockedFilesHandler&& isHoldingLockedFilesHandler)
+ : m_isHoldingLockedFilesHandler(WTFMove(isHoldingLockedFilesHandler))
+ , m_hysteresis([this](PAL::HysteresisState state) { setIsHoldingLockedFiles(state == PAL::HysteresisState::Started); })
+{
+ ASSERT(RunLoop::isMain());
+ SQLiteDatabaseTracker::setClient(this);
+}
+
+WebSQLiteDatabaseTracker::~WebSQLiteDatabaseTracker()
+{
+ ASSERT(RunLoop::isMain());
+ SQLiteDatabaseTracker::setClient(nullptr);
+
+ if (m_hysteresis.state() == PAL::HysteresisState::Started)
+ setIsHoldingLockedFiles(false);
+}
+
+void WebSQLiteDatabaseTracker::setIsSuspended(bool isSuspended)
+{
+ ASSERT(RunLoop::isMain());
+ m_isSuspended = isSuspended;
+}
+
+void WebSQLiteDatabaseTracker::willBeginFirstTransaction()
+{
+ RunLoop::main().dispatch([weakThis = makeWeakPtr(*this)] {
+ if (weakThis)
+ weakThis->m_hysteresis.start();
+ });
+}
+
+void WebSQLiteDatabaseTracker::didFinishLastTransaction()
+{
+ RunLoop::main().dispatch([weakThis = makeWeakPtr(*this)] {
+ if (weakThis)
+ weakThis->m_hysteresis.stop();
+ });
+}
+
+void WebSQLiteDatabaseTracker::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
+{
+ ASSERT(RunLoop::isMain());
+
+ if (m_isSuspended)
+ return;
+
+ m_isHoldingLockedFilesHandler(isHoldingLockedFiles);
+}
+
+} // namespace WebKit
Added: trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h (0 => 263038)
--- trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h (rev 0)
+++ trunk/Source/WebKit/Shared/WebSQLiteDatabaseTracker.h 2020-06-15 15:44:40 UTC (rev 263038)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2014 Apple Inc. All rights reserved.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <WebCore/SQLiteDatabaseTrackerClient.h>
+#include <pal/HysteresisActivity.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/WeakPtr.h>
+
+namespace WebKit {
+
+// Use eager initialization for the WeakPtrFactory since we call makeWeakPtr() from a non-main thread.
+class WebSQLiteDatabaseTracker final : public WebCore::SQLiteDatabaseTrackerClient, public CanMakeWeakPtr<WebSQLiteDatabaseTracker, WeakPtrFactoryInitialization::Eager> {
+ WTF_MAKE_NONCOPYABLE(WebSQLiteDatabaseTracker)
+public:
+ using IsHoldingLockedFilesHandler = Function<void(bool)>;
+ explicit WebSQLiteDatabaseTracker(IsHoldingLockedFilesHandler&&);
+
+ ~WebSQLiteDatabaseTracker();
+
+ void setIsSuspended(bool);
+
+private:
+ void setIsHoldingLockedFiles(bool);
+
+ // WebCore::SQLiteDatabaseTrackerClient.
+ void willBeginFirstTransaction() final;
+ void didFinishLastTransaction() final;
+
+ IsHoldingLockedFilesHandler m_isHoldingLockedFilesHandler;
+ PAL::HysteresisActivity m_hysteresis;
+ bool m_isSuspended { false };
+};
+
+} // namespace WebKit
Modified: trunk/Source/WebKit/SourcesCocoa.txt (263037 => 263038)
--- trunk/Source/WebKit/SourcesCocoa.txt 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/SourcesCocoa.txt 2020-06-15 15:44:40 UTC (rev 263038)
@@ -135,6 +135,7 @@
Shared/DocumentEditingContext.mm
Shared/FocusedElementInformation.cpp
Shared/VisibleContentRectUpdateInfo.cpp
+Shared/WebSQLiteDatabaseTracker.cpp
Shared/cf/ArgumentCodersCF.cpp @no-unify
Shared/cf/CookieStorageUtilsCF.mm
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-06-15 15:44:40 UTC (rev 263038)
@@ -276,6 +276,8 @@
#if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER)
m_customProtocolManagerProxy.invalidate();
#endif
+
+ m_activityForHoldingLockedFiles = nullptr;
m_syncAllCookiesActivity = nullptr;
m_syncAllCookiesCounter = 0;
@@ -1223,6 +1225,19 @@
if (canSendMessage())
send(Messages::NetworkProcess::ProcessDidResume(), 0);
}
+
+void NetworkProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
+{
+ if (!isHoldingLockedFiles) {
+ RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the Network process is no longer holding locked files");
+ m_activityForHoldingLockedFiles = nullptr;
+ return;
+ }
+ if (!m_activityForHoldingLockedFiles) {
+ RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the Network process is holding locked files");
+ m_activityForHoldingLockedFiles = m_throttler.backgroundActivity("Holding locked files"_s).moveToUniquePtr();
+ }
+}
void NetworkProcessProxy::syncAllCookies()
{
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2020-06-15 15:44:40 UTC (rev 263038)
@@ -188,6 +188,8 @@
void synthesizeAppIsBackground(bool background);
+ void setIsHoldingLockedFiles(bool);
+
void syncAllCookies();
void didSyncAllCookies();
@@ -308,6 +310,7 @@
LegacyCustomProtocolManagerProxy m_customProtocolManagerProxy;
#endif
ProcessThrottler m_throttler;
+ std::unique_ptr<ProcessThrottler::BackgroundActivity> m_activityForHoldingLockedFiles;
std::unique_ptr<ProcessThrottler::BackgroundActivity> m_syncAllCookiesActivity;
ProcessThrottler::ActivityVariant m_activityFromWebProcesses;
Modified: trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in 2020-06-15 15:44:40 UTC (rev 263038)
@@ -34,6 +34,8 @@
TestProcessIncomingSyncMessagesWhenWaitingForSyncReply(WebKit::WebPageProxyIdentifier pageID) -> (bool handled) Synchronous
TerminateUnresponsiveServiceWorkerProcesses(WebCore::ProcessIdentifier processIdentifier)
+ SetIsHoldingLockedFiles(bool isHoldingLockedFiles)
+
# Diagnostic messages logging
LogDiagnosticMessage(WebKit::WebPageProxyIdentifier pageID, String message, String description, enum:bool WebCore::ShouldSample shouldSample)
LogDiagnosticMessageWithResult(WebKit::WebPageProxyIdentifier pageID, String message, String description, uint32_t result, enum:bool WebCore::ShouldSample shouldSample)
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp 2020-06-15 15:44:40 UTC (rev 263038)
@@ -418,6 +418,7 @@
m_responsivenessTimer.invalidate();
m_backgroundResponsivenessTimer.invalidate();
+ m_activityForHoldingLockedFiles = nullptr;
m_audibleMediaActivity = WTF::nullopt;
for (auto& frame : copyToVector(m_frameMap.values()))
@@ -1402,6 +1403,19 @@
}
}
+void WebProcessProxy::setIsHoldingLockedFiles(bool isHoldingLockedFiles)
+{
+ if (!isHoldingLockedFiles) {
+ RELEASE_LOG(ProcessSuspension, "UIProcess is releasing a background assertion because the WebContent process is no longer holding locked files");
+ m_activityForHoldingLockedFiles = nullptr;
+ return;
+ }
+ if (!m_activityForHoldingLockedFiles) {
+ RELEASE_LOG(ProcessSuspension, "UIProcess is taking a background assertion because the WebContent process is holding locked files");
+ m_activityForHoldingLockedFiles = m_throttler.backgroundActivity("Holding locked files"_s).moveToUniquePtr();
+ }
+}
+
void WebProcessProxy::isResponsive(CompletionHandler<void(bool isWebProcessResponsive)>&& callback)
{
if (m_isResponsive == NoOrMaybe::No) {
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h 2020-06-15 15:44:40 UTC (rev 263038)
@@ -244,6 +244,8 @@
void windowServerConnectionStateChanged();
+ void setIsHoldingLockedFiles(bool);
+
ProcessThrottler& throttler() final { return m_throttler; }
void isResponsive(CompletionHandler<void(bool isWebProcessResponsive)>&&);
@@ -537,6 +539,7 @@
int m_numberOfTimesSuddenTerminationWasDisabled;
ProcessThrottler m_throttler;
+ std::unique_ptr<ProcessThrottler::BackgroundActivity> m_activityForHoldingLockedFiles;
ForegroundWebProcessToken m_foregroundToken;
BackgroundWebProcessToken m_backgroundToken;
Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in (263037 => 263038)
--- trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.messages.in 2020-06-15 15:44:40 UTC (rev 263038)
@@ -42,6 +42,8 @@
GetGPUProcessConnection() -> (struct WebKit::GPUProcessConnectionInfo connectionInfo) Synchronous
#endif
+ SetIsHoldingLockedFiles(bool isHoldingLockedFiles)
+
DidExceedActiveMemoryLimit()
DidExceedInactiveMemoryLimit()
DidExceedCPULimit()
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (263037 => 263038)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2020-06-15 15:44:40 UTC (rev 263038)
@@ -1326,6 +1326,7 @@
832AE2521BE2E8CD00FAAE10 /* NetworkCacheSpeculativeLoadManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 832AE2501BE2E8CD00FAAE10 /* NetworkCacheSpeculativeLoadManager.h */; };
832ED18C1E2FE157006BA64A /* PerActivityStateCPUUsageSampler.h in Headers */ = {isa = PBXBuildFile; fileRef = 832ED18A1E2FE13B006BA64A /* PerActivityStateCPUUsageSampler.h */; };
834B250F1A831A8D00CFB150 /* NetworkCacheFileSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 834B250E1A831A8D00CFB150 /* NetworkCacheFileSystem.h */; };
+ 836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */; };
8372DB251A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 8372DB241A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
8372DB291A67562800C697C5 /* WebPageDiagnosticLoggingClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 8372DB271A67562800C697C5 /* WebPageDiagnosticLoggingClient.h */; };
8372DB2F1A677D4A00C697C5 /* WKDiagnosticLoggingResultType.h in Headers */ = {isa = PBXBuildFile; fileRef = 8372DB2E1A677D4A00C697C5 /* WKDiagnosticLoggingResultType.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4335,6 +4336,8 @@
83397C6622124BD100B62388 /* WebProcessCache.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebProcessCache.cpp; sourceTree = "<group>"; };
83397C6722124BD100B62388 /* WebProcessCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebProcessCache.h; sourceTree = "<group>"; };
834B250E1A831A8D00CFB150 /* NetworkCacheFileSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkCacheFileSystem.h; sourceTree = "<group>"; };
+ 8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebSQLiteDatabaseTracker.cpp; sourceTree = "<group>"; };
+ 8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSQLiteDatabaseTracker.h; sourceTree = "<group>"; };
8372DB241A674C8F00C697C5 /* WKPageDiagnosticLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPageDiagnosticLoggingClient.h; sourceTree = "<group>"; };
8372DB261A67562800C697C5 /* WebPageDiagnosticLoggingClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebPageDiagnosticLoggingClient.cpp; sourceTree = "<group>"; };
8372DB271A67562800C697C5 /* WebPageDiagnosticLoggingClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPageDiagnosticLoggingClient.h; sourceTree = "<group>"; };
@@ -6170,6 +6173,8 @@
5C13024A1FE341A7000D9B31 /* WebsitePoliciesData.h */,
0EDE85022004E74900030560 /* WebsitePopUpPolicy.h */,
71FB810A2260627A00323677 /* WebsiteSimulatedMouseEventsDispatchPolicy.h */,
+ 8360349D1ACB34D600626549 /* WebSQLiteDatabaseTracker.cpp */,
+ 8360349E1ACB34D600626549 /* WebSQLiteDatabaseTracker.h */,
C0337DD7127A51B6008FF4F4 /* WebTouchEvent.cpp */,
7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */,
7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */,
@@ -11397,6 +11402,7 @@
417915AF2256BB7500D6F97E /* WebSocketChannel.h in Headers */,
417915B12256C0D600D6F97E /* WebSocketChannelManager.h in Headers */,
C149380922347104000CD707 /* WebSpeechSynthesisClient.h in Headers */,
+ 836034A01ACB34D600626549 /* WebSQLiteDatabaseTracker.h in Headers */,
1A52C0F81A38CDC70016160A /* WebStorageNamespaceProvider.h in Headers */,
9356F2DC2152B6B500E6D5DF /* WebSWClientConnection.h in Headers */,
517A53101F47A86200DCDC0A /* WebSWClientConnectionMessages.h in Headers */,
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (263037 => 263038)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2020-06-15 15:44:40 UTC (rev 263038)
@@ -146,6 +146,10 @@
#include "UserMediaCaptureManager.h"
#endif
+#if PLATFORM(IOS_FAMILY)
+#include "WebSQLiteDatabaseTracker.h"
+#endif
+
#if ENABLE(SEC_ITEM_SHIM)
#include "SecItemShim.h"
#endif
@@ -223,6 +227,9 @@
, m_pluginProcessConnectionManager(PluginProcessConnectionManager::create())
#endif
, m_nonVisibleProcessCleanupTimer(*this, &WebProcess::nonVisibleProcessCleanupTimerFired)
+#if PLATFORM(IOS_FAMILY)
+ , m_webSQLiteDatabaseTracker([this](bool isHoldingLockedFiles) { parentProcessConnection()->send(Messages::WebProcessProxy::SetIsHoldingLockedFiles(isHoldingLockedFiles), 0); })
+#endif
{
// Initialize our platform strategies.
WebPlatformStrategies::initialize();
@@ -1424,6 +1431,7 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ m_webSQLiteDatabaseTracker.setIsSuspended(true);
SQLiteDatabase::setIsDatabaseOpeningForbidden(true);
if (DatabaseTracker::isInitialized())
DatabaseTracker::singleton().closeAllDatabases(CurrentQueryBehavior::Interrupt);
@@ -1487,6 +1495,7 @@
unfreezeAllLayerTrees();
#if PLATFORM(IOS_FAMILY)
+ m_webSQLiteDatabaseTracker.setIsSuspended(false);
SQLiteDatabase::setIsDatabaseOpeningForbidden(false);
accessibilityProcessSuspendedNotification(false);
#endif
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (263037 => 263038)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2020-06-15 15:39:54 UTC (rev 263037)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2020-06-15 15:44:40 UTC (rev 263038)
@@ -39,6 +39,7 @@
#include "WebInspectorInterruptDispatcher.h"
#include "WebPageProxyIdentifier.h"
#include "WebProcessCreationParameters.h"
+#include "WebSQLiteDatabaseTracker.h"
#include "WebSocketChannelManager.h"
#include <WebCore/ActivityState.h>
#include <WebCore/FrameIdentifier.h>
@@ -578,6 +579,10 @@
RefPtr<WebCore::ApplicationCacheStorage> m_applicationCacheStorage;
+#if PLATFORM(IOS_FAMILY)
+ WebSQLiteDatabaseTracker m_webSQLiteDatabaseTracker;
+#endif
+
bool m_suppressMemoryPressureHandler { false };
#if PLATFORM(MAC)
std::unique_ptr<WebCore::CPUMonitor> m_cpuMonitor;