Changeset 247395 in webkit
- Timestamp:
- Jul 12, 2019 1:14:05 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247391 r247395 1 2019-07-12 Youenn Fablet <youenn@apple.com> 2 3 Add release logging for quota checks 4 https://bugs.webkit.org/show_bug.cgi?id=199697 5 6 Reviewed by Alex Christensen. 7 8 Log whether a request to extend quota is made and the result of the request. 9 This logging should happen in the networking process. 10 No change of behavior. 11 12 * platform/Logging.h: 13 * storage/StorageQuotaManager.cpp: 14 (WebCore::StorageQuotaManager::askForMoreSpace): 15 (WebCore::StorageQuotaManager::processPendingRequests): 16 1 17 2019-07-12 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/Source/WebCore/platform/Logging.h
r245373 r247395 97 97 M(SpellingAndGrammar) \ 98 98 M(SQLDatabase) \ 99 M(Storage) \ 99 100 M(StorageAPI) \ 100 101 M(SVG) \ -
trunk/Source/WebCore/storage/StorageQuotaManager.cpp
r244112 r247395 27 27 #include "StorageQuotaManager.h" 28 28 29 #include "Logging.h" 29 30 #include "StorageQuotaUser.h" 30 31 … … 156 157 ASSERT(shouldAskForMoreSpace(spaceIncrease)); 157 158 ASSERT(!m_isWaitingForSpaceIncreaseResponse); 159 160 RELEASE_LOG(Storage, "%p - StorageQuotaManager::askForMoreSpace %" PRIu64, this, spaceIncrease); 158 161 m_isWaitingForSpaceIncreaseResponse = true; 159 162 m_spaceIncreaseRequester(m_quota, spaceUsage(), spaceIncrease, [this, weakThis = makeWeakPtr(*this)](Optional<uint64_t> newQuota) { 160 163 if (!weakThis) 161 164 return; 165 166 RELEASE_LOG(Storage, "%p - StorageQuotaManager::askForMoreSpace received response %" PRIu64, this, newQuota ? *newQuota : 0); 167 162 168 m_isWaitingForSpaceIncreaseResponse = false; 163 169 processPendingRequests(newQuota, ShouldDequeueFirstPendingRequest::Yes); … … 181 187 if (shouldDequeueFirstPendingRequest == ShouldDequeueFirstPendingRequest::Yes) { 182 188 auto request = m_pendingRequests.takeFirst(); 183 auto decision = shouldAskForMoreSpace(request.spaceIncrease) ? Decision::Deny : Decision::Grant; 184 request.callback(decision); 189 bool shouldAllowRequest = !shouldAskForMoreSpace(request.spaceIncrease); 190 191 RELEASE_LOG(Storage, "%p - StorageQuotaManager::processPendingRequests first request decision is %d", this, shouldAllowRequest); 192 193 request.callback(shouldAllowRequest ? Decision::Grant : Decision::Deny); 185 194 } 186 195 -
trunk/Source/WebKit/ChangeLog
r247394 r247395 1 2019-07-12 Youenn Fablet <youenn@apple.com> 2 3 Add release logging for quota checks 4 https://bugs.webkit.org/show_bug.cgi?id=199697 5 6 Reviewed by Alex Christensen. 7 8 Log requests made to the page and the result from the application. 9 10 * Platform/Logging.h: 11 * UIProcess/WebPageProxy.cpp: 12 (WebKit::WebPageProxy::requestStorageSpace): 13 1 14 2019-07-12 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/Source/WebKit/Platform/Logging.h
r246561 r247395 83 83 M(ServiceWorker) \ 84 84 M(SessionState) \ 85 M(Storage) \ 85 86 M(StorageAPI) \ 86 87 M(TextInput) \ -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r247272 r247395 7303 7303 void WebPageProxy::requestStorageSpace(uint64_t frameID, const String& originIdentifier, const String& databaseName, const String& displayName, uint64_t currentQuota, uint64_t currentOriginUsage, uint64_t currentDatabaseUsage, uint64_t expectedUsage, CompletionHandler<void(uint64_t)>&& completionHandler) 7304 7304 { 7305 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace for frame %" PRIu64 ", current quota %" PRIu64 " current usage %" PRIu64 " expected usage %" PRIu64, frameID, currentQuota, currentDatabaseUsage, expectedUsage); 7306 7305 7307 StorageRequests::singleton().processOrAppend([this, protectedThis = makeRef(*this), pageURL = currentURL(), frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, completionHandler = WTFMove(completionHandler)]() mutable { 7306 this->makeStorageSpaceRequest(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [this, protectedThis = WTFMove(protectedThis), pageURL = WTFMove(pageURL), completionHandler = WTFMove(completionHandler), currentQuota](auto quota) mutable { 7307 if (quota <= currentQuota && this->currentURL() == pageURL) 7308 this->makeStorageSpaceRequest(frameID, originIdentifier, databaseName, displayName, currentQuota, currentOriginUsage, currentDatabaseUsage, expectedUsage, [this, protectedThis = WTFMove(protectedThis), frameID, pageURL = WTFMove(pageURL), completionHandler = WTFMove(completionHandler), currentQuota](auto quota) mutable { 7309 7310 RELEASE_LOG_IF_ALLOWED(Storage, "requestStorageSpace response for frame %" PRIu64 ", quota %" PRIu64, frameID, quota); 7311 7312 if (quota <= currentQuota && this->currentURL() == pageURL) { 7313 RELEASE_LOG_IF_ALLOWED(Storage, "storage space increase denied"); 7308 7314 m_isQuotaIncreaseDenied = true; 7315 } 7309 7316 completionHandler(quota); 7310 7317 StorageRequests::singleton().processNextIfAny();
Note: See TracChangeset
for help on using the changeset viewer.