<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[278788] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/278788">278788</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2021-06-11 16:13:05 -0700 (Fri, 11 Jun 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Enable more release logging in WebCore for ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=226940

Reviewed by Geoffrey Garen.

Enable more release logging in WebCore for ephemeral sessions, to faciliate
debugging.

* Modules/webaudio/AudioContext.cpp:
* loader/PolicyChecker.cpp:
(WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
* page/FrameView.cpp:
(WebCore::FrameView::scheduleResizeEventIfNeeded):
(WebCore::FrameView::paintContents):
(WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
* page/PerformanceMonitor.cpp:
(WebCore::PerformanceMonitor::measurePostLoadCPUUsage):
(WebCore::PerformanceMonitor::measurePostLoadMemoryUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingMemoryUsage):
(WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage):
(WebCore::PerformanceMonitor::measureCPUUsageInActivityState):
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::ServiceWorker):
(WebCore::ServiceWorker::updateState):
(WebCore::ServiceWorker::isAlwaysOnLoggingAllowed const): Deleted.
* workers/service/ServiceWorker.h:
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::addRegistration):
(WebCore::ServiceWorkerContainer::unregisterRegistration):
(WebCore::ServiceWorkerContainer::updateRegistration):
(WebCore::ServiceWorkerContainer::jobFailedWithException):
(WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
(WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
(WebCore::ServiceWorkerContainer::startScriptFetchForJob):
(WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
(WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
(WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const): Deleted.
* workers/service/ServiceWorkerContainer.h:
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
(WebCore::ServiceWorkerRegistration::updateStateFromServer):
(WebCore::ServiceWorkerRegistration::queueTaskToFireUpdateFoundEvent):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioAudioContextcpp">trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderPolicyCheckercpp">trunk/Source/WebCore/loader/PolicyChecker.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePerformanceMonitorcpp">trunk/Source/WebCore/page/PerformanceMonitor.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkercpp">trunk/Source/WebCore/workers/service/ServiceWorker.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerh">trunk/Source/WebCore/workers/service/ServiceWorker.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerContainercpp">trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerContainerh">trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkerRegistrationcpp">trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/ChangeLog      2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2021-06-11  Chris Dumez  <cdumez@apple.com>
+
+        Enable more release logging in WebCore for ephemeral sessions
+        https://bugs.webkit.org/show_bug.cgi?id=226940
+
+        Reviewed by Geoffrey Garen.
+
+        Enable more release logging in WebCore for ephemeral sessions, to faciliate
+        debugging.
+
+        * Modules/webaudio/AudioContext.cpp:
+        * loader/PolicyChecker.cpp:
+        (WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::scheduleResizeEventIfNeeded):
+        (WebCore::FrameView::paintContents):
+        (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
+        * page/PerformanceMonitor.cpp:
+        (WebCore::PerformanceMonitor::measurePostLoadCPUUsage):
+        (WebCore::PerformanceMonitor::measurePostLoadMemoryUsage):
+        (WebCore::PerformanceMonitor::measurePostBackgroundingMemoryUsage):
+        (WebCore::PerformanceMonitor::measurePostBackgroundingCPUUsage):
+        (WebCore::PerformanceMonitor::measureCPUUsageInActivityState):
+        * workers/service/ServiceWorker.cpp:
+        (WebCore::ServiceWorker::ServiceWorker):
+        (WebCore::ServiceWorker::updateState):
+        (WebCore::ServiceWorker::isAlwaysOnLoggingAllowed const): Deleted.
+        * workers/service/ServiceWorker.h:
+        * workers/service/ServiceWorkerContainer.cpp:
+        (WebCore::ServiceWorkerContainer::addRegistration):
+        (WebCore::ServiceWorkerContainer::unregisterRegistration):
+        (WebCore::ServiceWorkerContainer::updateRegistration):
+        (WebCore::ServiceWorkerContainer::jobFailedWithException):
+        (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
+        (WebCore::ServiceWorkerContainer::jobResolvedWithUnregistrationResult):
+        (WebCore::ServiceWorkerContainer::startScriptFetchForJob):
+        (WebCore::ServiceWorkerContainer::jobFinishedLoadingScript):
+        (WebCore::ServiceWorkerContainer::jobFailedLoadingScript):
+        (WebCore::ServiceWorkerContainer::isAlwaysOnLoggingAllowed const): Deleted.
+        * workers/service/ServiceWorkerContainer.h:
+        * workers/service/ServiceWorkerRegistration.cpp:
+        (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
+        (WebCore::ServiceWorkerRegistration::updateStateFromServer):
+        (WebCore::ServiceWorkerRegistration::queueTaskToFireUpdateFoundEvent):
+
</ins><span class="cx"> 2021-06-11  Patrick Angle  <pangle@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: Add instrumentation to node destruction for InspectorDOMAgent
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioAudioContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp   2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/Modules/webaudio/AudioContext.cpp      2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -55,7 +55,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(document() && document()->page() && document()->page()->isAlwaysOnLoggingAllowed(), Media, "%p - AudioContext::" fmt, this, ##__VA_ARGS__)
</del><ins>+#define AUDIOCONTEXT_RELEASE_LOG(fmt, ...) RELEASE_LOG(Media, "%p - AudioContext::" fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> #if OS(WINDOWS)
</span><span class="cx"> // Don't allow more than this number of simultaneous AudioContexts talking to hardware.
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderPolicyCheckercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/PolicyChecker.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/PolicyChecker.cpp    2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/loader/PolicyChecker.cpp       2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -54,10 +54,9 @@
</span><span class="cx"> #include "QuickLook.h"
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#define IS_ALLOWED (m_frame.page() ? m_frame.page()->sessionID().isAlwaysOnLoggingAllowed() : false)
</del><span class="cx"> #define PAGE_ID (m_frame.loader().pageID().value_or(PageIdentifier()).toUInt64())
</span><span class="cx"> #define FRAME_ID (m_frame.loader().frameID().value_or(FrameIdentifier()).toUInt64())
</span><del>-#define RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(IS_ALLOWED, Loading, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 "] PolicyChecker::" fmt, this, PAGE_ID, FRAME_ID, ##__VA_ARGS__)
</del><ins>+#define POLICYCHECKER_RELEASE_LOG(fmt, ...) RELEASE_LOG(Loading, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 "] PolicyChecker::" fmt, this, PAGE_ID, FRAME_ID, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -138,9 +137,9 @@
</span><span class="cx">     // This avoids confusion on the part of the client.
</span><span class="cx">     if (equalIgnoringHeaderFields(request, loader->lastCheckedRequest()) || (!request.isNull() && request.url().isEmpty())) {
</span><span class="cx">         if (!request.isNull() && request.url().isEmpty())
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because the URL is empty");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because the URL is empty");
</ins><span class="cx">         else
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because the URL is the same as the last request");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because the URL is the same as the last request");
</ins><span class="cx">         function(ResourceRequest(request), { }, NavigationPolicyDecision::ContinueLoad);
</span><span class="cx">         loader->setLastCheckedRequest(WTFMove(request));
</span><span class="cx">         return;
</span><span class="lines">@@ -158,9 +157,9 @@
</span><span class="cx">         if (isBackForwardLoadType(m_loadType))
</span><span class="cx">             m_loadType = FrameLoadType::Reload;
</span><span class="cx">         if (shouldContinue)
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because we have valid substitute data");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because we have valid substitute data");
</ins><span class="cx">         else
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: not continuing with substitute data because the content filter told us not to");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: not continuing with substitute data because the content filter told us not to");
</ins><span class="cx"> 
</span><span class="cx">         function(WTFMove(request), { }, shouldContinue ? NavigationPolicyDecision::ContinueLoad : NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">         return;
</span><span class="lines">@@ -172,7 +171,7 @@
</span><span class="cx">             // reveal that the frame was blocked. This way, it looks like any other cross-origin page load.
</span><span class="cx">             m_frame.ownerElement()->dispatchEvent(Event::create(eventNames().loadEvent, Event::CanBubble::No, Event::IsCancelable::No));
</span><span class="cx">         }
</span><del>-        RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: ignoring because disallowed by content security policy");
</del><ins>+        POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: ignoring because disallowed by content security policy");
</ins><span class="cx">         function(WTFMove(request), { }, NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -182,7 +181,7 @@
</span><span class="cx"> #if USE(QUICK_LOOK)
</span><span class="cx">     // Always allow QuickLook-generated URLs based on the protocol scheme.
</span><span class="cx">     if (!request.isNull() && isQuickLookPreviewURL(request.url())) {
</span><del>-        RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because quicklook-generated URL");
</del><ins>+        POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because quicklook-generated URL");
</ins><span class="cx">         return function(WTFMove(request), makeWeakPtr(formState.get()), NavigationPolicyDecision::ContinueLoad);
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -194,7 +193,7 @@
</span><span class="cx">             if (unblocked)
</span><span class="cx">                 frame->loader().reload();
</span><span class="cx">         });
</span><del>-        RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: ignoring because ContentFilterUnblockHandler can handle the request");
</del><ins>+        POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: ignoring because ContentFilterUnblockHandler can handle the request");
</ins><span class="cx">         return function({ }, nullptr, NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">     }
</span><span class="cx">     m_contentFilterUnblockHandler = { };
</span><span class="lines">@@ -211,7 +210,7 @@
</span><span class="cx">     FramePolicyFunction decisionHandler = [this, function = WTFMove(function), request = ResourceRequest(request), formState = std::exchange(formState, nullptr), suggestedFilename = WTFMove(suggestedFilename),
</span><span class="cx">          blobURLLifetimeExtension = WTFMove(blobURLLifetimeExtension), requestIdentifier, isInitialEmptyDocumentLoad] (PolicyAction policyAction, PolicyCheckIdentifier responseIdentifier) mutable {
</span><span class="cx">         if (!responseIdentifier.isValidFor(requestIdentifier)) {
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: ignoring because response is not valid for request");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: ignoring because response is not valid for request");
</ins><span class="cx">             return function({ }, nullptr, NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -223,22 +222,22 @@
</span><span class="cx">             m_frame.loader().client().startDownload(request, suggestedFilename);
</span><span class="cx">             FALLTHROUGH;
</span><span class="cx">         case PolicyAction::Ignore:
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: ignoring because policyAction from dispatchDecidePolicyForNavigationAction is Ignore");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: ignoring because policyAction from dispatchDecidePolicyForNavigationAction is Ignore");
</ins><span class="cx">             return function({ }, nullptr, NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">         case PolicyAction::StopAllLoads:
</span><del>-            RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: stopping because policyAction from dispatchDecidePolicyForNavigationAction is StopAllLoads");
</del><ins>+            POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: stopping because policyAction from dispatchDecidePolicyForNavigationAction is StopAllLoads");
</ins><span class="cx">             function({ }, nullptr, NavigationPolicyDecision::StopAllLoads);
</span><span class="cx">             return;
</span><span class="cx">         case PolicyAction::Use:
</span><span class="cx">             if (!m_frame.loader().client().canHandleRequest(request)) {
</span><span class="cx">                 handleUnimplementablePolicy(m_frame.loader().client().cannotShowURLError(request));
</span><del>-                RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: ignoring because frame loader client can't handle the request");
</del><ins>+                POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: ignoring because frame loader client can't handle the request");
</ins><span class="cx">                 return function({ }, { }, NavigationPolicyDecision::IgnoreLoad);
</span><span class="cx">             }
</span><span class="cx">             if (isInitialEmptyDocumentLoad)
</span><del>-                RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because this is an initial empty document");
</del><ins>+                POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because this is an initial empty document");
</ins><span class="cx">             else
</span><del>-                RELEASE_LOG_IF_ALLOWED("checkNavigationPolicy: continuing because this policyAction from dispatchDecidePolicyForNavigationAction is Use");
</del><ins>+                POLICYCHECKER_RELEASE_LOG("checkNavigationPolicy: continuing because this policyAction from dispatchDecidePolicyForNavigationAction is Use");
</ins><span class="cx">             return function(WTFMove(request), makeWeakPtr(formState.get()), NavigationPolicyDecision::ContinueLoad);
</span><span class="cx">         }
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="lines">@@ -311,4 +310,4 @@
</span><span class="cx"> #undef IS_ALLOWED
</span><span class="cx"> #undef PAGE_ID
</span><span class="cx"> #undef FRAME_ID
</span><del>-#undef RELEASE_LOG_IF_ALLOWED
</del><ins>+#undef POLICYCHECKER_RELEASE_LOG
</ins></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp  2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/page/FrameView.cpp     2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -137,7 +137,7 @@
</span><span class="cx"> 
</span><span class="cx"> #define PAGE_ID frame().pageID().value_or(PageIdentifier()).toUInt64()
</span><span class="cx"> #define FRAME_ID frame().frameID().value_or(FrameIdentifier()).toUInt64()
</span><del>-#define FRAMEVIEW_RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(frame().page() && frame().page()->sessionID().isAlwaysOnLoggingAllowed(), channel, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 ", main=%d] FrameView::" fmt, this, PAGE_ID, FRAME_ID, frame().isMainFrame(), ##__VA_ARGS__)
</del><ins>+#define FRAMEVIEW_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - [pageID=%" PRIu64 ", frameID=%" PRIu64 ", main=%d] FrameView::" fmt, this, PAGE_ID, FRAME_ID, frame().isMainFrame(), ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -3407,7 +3407,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto* document = frame().document();
</span><span class="cx">     if (document->quirks().shouldSilenceWindowResizeEvents()) {
</span><del>-        FRAMEVIEW_RELEASE_LOG_IF_ALLOWED(Events, "scheduleResizeEventIfNeeded: Not firing resize events because they are temporarily disabled for this page");
</del><ins>+        FRAMEVIEW_RELEASE_LOG(Events, "scheduleResizeEventIfNeeded: Not firing resize events because they are temporarily disabled for this page");
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -4305,7 +4305,7 @@
</span><span class="cx"> 
</span><span class="cx">     ASSERT(!needsLayout());
</span><span class="cx">     if (needsLayout()) {
</span><del>-        FRAMEVIEW_RELEASE_LOG_IF_ALLOWED(Layout, "paintContents: Not painting because render tree needs layout");
</del><ins>+        FRAMEVIEW_RELEASE_LOG(Layout, "paintContents: Not painting because render tree needs layout");
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -5319,7 +5319,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (milestonesAchieved && frame().isMainFrame()) {
</span><span class="cx">         if (milestonesAchieved.contains(DidFirstVisuallyNonEmptyLayout))
</span><del>-            FRAMEVIEW_RELEASE_LOG_IF_ALLOWED(Layout, "fireLayoutRelatedMilestonesIfNeeded: Firing first visually non-empty layout milestone on the main frame");
</del><ins>+            FRAMEVIEW_RELEASE_LOG(Layout, "fireLayoutRelatedMilestonesIfNeeded: Firing first visually non-empty layout milestone on the main frame");
</ins><span class="cx">         frame().loader().didReachLayoutMilestone(milestonesAchieved);
</span><span class="cx">     }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepagePerformanceMonitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/PerformanceMonitor.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/PerformanceMonitor.cpp 2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/page/PerformanceMonitor.cpp    2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-#define RELEASE_LOG_IF_ALLOWED(channel, fmt, ...) RELEASE_LOG_IF(m_page.sessionID().isAlwaysOnLoggingAllowed(), channel, "%p - PerformanceMonitor::" fmt, this, ##__VA_ARGS__)
</del><ins>+#define PERFMONITOR_RELEASE_LOG(channel, fmt, ...) RELEASE_LOG(channel, "%p - PerformanceMonitor::" fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> static constexpr const Seconds cpuUsageMeasurementDelay { 5_s };
</span><span class="cx"> static constexpr const Seconds postLoadCPUUsageMeasurementDuration { 10_s };
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     double cpuUsage = cpuTime.value().percentageCPUUsageSince(*m_postLoadCPUTime);
</span><del>-    RELEASE_LOG_IF_ALLOWED(PerformanceLogging, "measurePostLoadCPUUsage: Process was using %.1f%% CPU after the page load.", cpuUsage);
</del><ins>+    PERFMONITOR_RELEASE_LOG(PerformanceLogging, "measurePostLoadCPUUsage: Process was using %.1f%% CPU after the page load.", cpuUsage);
</ins><span class="cx">     m_page.diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::postPageLoadCPUUsageKey(), DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey(cpuUsage), ShouldSample::No);
</span><span class="cx"> 
</span><span class="cx">     if (cpuUsage > postPageLoadCPUUsageDomainReportingThreshold)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     if (!memoryUsage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RELEASE_LOG_IF_ALLOWED(PerformanceLogging, "measurePostLoadMemoryUsage: Process was using %llu bytes of memory after the page load.", memoryUsage.value());
</del><ins>+    PERFMONITOR_RELEASE_LOG(PerformanceLogging, "measurePostLoadMemoryUsage: Process was using %llu bytes of memory after the page load.", memoryUsage.value());
</ins><span class="cx">     m_page.diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::postPageLoadMemoryUsageKey(), DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(memoryUsage.value()), ShouldSample::No);
</span><span class="cx"> 
</span><span class="cx">     // On iOS, we report actual Jetsams instead.
</span><span class="lines">@@ -219,7 +219,7 @@
</span><span class="cx">     if (!memoryUsage)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    RELEASE_LOG_IF_ALLOWED(PerformanceLogging, "measurePostBackgroundingMemoryUsage: Process was using %llu bytes of memory after becoming non visible.", memoryUsage.value());
</del><ins>+    PERFMONITOR_RELEASE_LOG(PerformanceLogging, "measurePostBackgroundingMemoryUsage: Process was using %llu bytes of memory after becoming non visible.", memoryUsage.value());
</ins><span class="cx">     m_page.diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey(), DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(memoryUsage.value()), ShouldSample::No);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -241,7 +241,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     double cpuUsage = cpuTime.value().percentageCPUUsageSince(*m_postBackgroundingCPUTime);
</span><del>-    RELEASE_LOG_IF_ALLOWED(PerformanceLogging, "measurePostBackgroundingCPUUsage: Process was using %.1f%% CPU after becoming non visible.", cpuUsage);
</del><ins>+    PERFMONITOR_RELEASE_LOG(PerformanceLogging, "measurePostBackgroundingCPUUsage: Process was using %.1f%% CPU after becoming non visible.", cpuUsage);
</ins><span class="cx">     m_page.diagnosticLoggingClient().logDiagnosticMessage(DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey(), DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey(cpuUsage), ShouldSample::No);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if !RELEASE_LOG_DISABLED
</span><span class="cx">     double cpuUsage = cpuTime.value().percentageCPUUsageSince(*m_perActivityStateCPUTime);
</span><del>-    RELEASE_LOG_IF_ALLOWED(PerformanceLogging, "measureCPUUsageInActivityState: Process is using %.1f%% CPU in state: %s", cpuUsage, stringForCPUSamplingActivityState(activityState));
</del><ins>+    PERFMONITOR_RELEASE_LOG(PerformanceLogging, "measureCPUUsageInActivityState: Process is using %.1f%% CPU in state: %s", cpuUsage, stringForCPUSamplingActivityState(activityState));
</ins><span class="cx"> #endif
</span><span class="cx">     m_page.chrome().client().reportProcessCPUTime((cpuTime.value().systemTime + cpuTime.value().userTime) - (m_perActivityStateCPUTime.value().systemTime + m_perActivityStateCPUTime.value().userTime), activityState);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorker.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorker.cpp   2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/workers/service/ServiceWorker.cpp      2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -45,8 +45,8 @@
</span><span class="cx"> #include <wtf/IsoMallocInlines.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> 
</span><del>-#define WORKER_RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorker::" fmt, this, ##__VA_ARGS__)
-#define WORKER_RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorker::" fmt, this, ##__VA_ARGS__)
</del><ins>+#define WORKER_RELEASE_LOG(fmt, ...) RELEASE_LOG(ServiceWorker, "%p - ServiceWorker::" fmt, this, ##__VA_ARGS__)
+#define WORKER_RELEASE_LOG_ERROR(fmt, ...) RELEASE_LOG_ERROR(ServiceWorker, "%p - ServiceWorker::" fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">     relaxAdoptionRequirement();
</span><span class="cx">     updatePendingActivityForEventDispatch();
</span><span class="cx"> 
</span><del>-    WORKER_RELEASE_LOG_IF_ALLOWED("serviceWorkerID=%llu, state=%hhu", identifier().toUInt64(), m_data.state);
</del><ins>+    WORKER_RELEASE_LOG("serviceWorkerID=%llu, state=%hhu", identifier().toUInt64(), m_data.state);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorker::~ServiceWorker()
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> 
</span><span class="cx"> void ServiceWorker::updateState(State state)
</span><span class="cx"> {
</span><del>-    WORKER_RELEASE_LOG_IF_ALLOWED("updateState: Updating service worker %llu state from %hhu to %hhu. registrationID=%llu", identifier().toUInt64(), m_data.state, state, registrationIdentifier().toUInt64());
</del><ins>+    WORKER_RELEASE_LOG("updateState: Updating service worker %llu state from %hhu to %hhu. registrationID=%llu", identifier().toUInt64(), m_data.state, state, registrationIdentifier().toUInt64());
</ins><span class="cx">     m_data.state = state;
</span><span class="cx">     if (state != State::Installing && !m_isStopped) {
</span><span class="cx">         ASSERT(m_pendingActivityForEventDispatch);
</span><span class="lines">@@ -163,19 +163,6 @@
</span><span class="cx">     m_pendingActivityForEventDispatch = makePendingActivity(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ServiceWorker::isAlwaysOnLoggingAllowed() const
-{
-    auto* context = scriptExecutionContext();
-    if (!context)
-        return false;
-
-    auto* container = context->serviceWorkerContainer();
-    if (!container)
-        return false;
-
-    return container->isAlwaysOnLoggingAllowed();
-}
-
</del><span class="cx"> } // namespace WebCore
</span><span class="cx"> 
</span><span class="cx"> #endif // ENABLE(SERVICE_WORKER)
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorker.h (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorker.h     2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/workers/service/ServiceWorker.h        2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -82,8 +82,6 @@
</span><span class="cx">     const char* activeDOMObjectName() const final;
</span><span class="cx">     void stop() final;
</span><span class="cx"> 
</span><del>-    bool isAlwaysOnLoggingAllowed() const;
-
</del><span class="cx">     SWClientConnection& swConnection();
</span><span class="cx"> 
</span><span class="cx">     ServiceWorkerData m_data;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp  2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp     2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx"> #include <wtf/Scope.h>
</span><span class="cx"> #include <wtf/URL.h>
</span><span class="cx"> 
</span><del>-#define CONTAINER_RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorkerContainer::" fmt, this, ##__VA_ARGS__)
-#define CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorkerContainer::" fmt, this, ##__VA_ARGS__)
</del><ins>+#define CONTAINER_RELEASE_LOG(fmt, ...) RELEASE_LOG(ServiceWorker, "%p - ServiceWorkerContainer::" fmt, this, ##__VA_ARGS__)
+#define CONTAINER_RELEASE_LOG_ERROR(fmt, ...) RELEASE_LOG_ERROR(ServiceWorker, "%p - ServiceWorkerContainer::" fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -142,13 +142,13 @@
</span><span class="cx"> 
</span><span class="cx">     jobData.scriptURL = context->completeURL(relativeScriptURL);
</span><span class="cx">     if (!jobData.scriptURL.isValid()) {
</span><del>-        CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: Invalid scriptURL");
</del><ins>+        CONTAINER_RELEASE_LOG_ERROR("addRegistration: Invalid scriptURL");
</ins><span class="cx">         promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a valid relative script URL"_s });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (!jobData.scriptURL.protocolIsInHTTPFamily()) {
</span><del>-        CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: Invalid scriptURL scheme is not HTTP or HTTPS");
</del><ins>+        CONTAINER_RELEASE_LOG_ERROR("addRegistration: Invalid scriptURL scheme is not HTTP or HTTPS");
</ins><span class="cx">         promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a script URL whose protocol is either HTTP or HTTPS"_s });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -155,7 +155,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto path = jobData.scriptURL.path();
</span><span class="cx">     if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) {
</span><del>-        CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scriptURL contains invalid character");
</del><ins>+        CONTAINER_RELEASE_LOG_ERROR("addRegistration: scriptURL contains invalid character");
</ins><span class="cx">         promise->reject(Exception { TypeError, "serviceWorker.register() must be called with a script URL whose path does not contain '%2f' or '%5c'"_s });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx">         jobData.scopeURL = URL(jobData.scriptURL, "./");
</span><span class="cx"> 
</span><span class="cx">     if (!jobData.scopeURL.isNull() && !jobData.scopeURL.protocolIsInHTTPFamily()) {
</span><del>-        CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scopeURL scheme is not HTTP or HTTPS");
</del><ins>+        CONTAINER_RELEASE_LOG_ERROR("addRegistration: scopeURL scheme is not HTTP or HTTPS");
</ins><span class="cx">         promise->reject(Exception { TypeError, "Scope URL provided to serviceWorker.register() must be either HTTP or HTTPS"_s });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -173,12 +173,12 @@
</span><span class="cx"> 
</span><span class="cx">     path = jobData.scopeURL.path();
</span><span class="cx">     if (path.containsIgnoringASCIICase("%2f") || path.containsIgnoringASCIICase("%5c")) {
</span><del>-        CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("addRegistration: scopeURL contains invalid character");
</del><ins>+        CONTAINER_RELEASE_LOG_ERROR("addRegistration: scopeURL contains invalid character");
</ins><span class="cx">         promise->reject(Exception { TypeError, "Scope URL provided to serviceWorker.register() cannot have a path that contains '%2f' or '%5c'"_s });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("addRegistration: Registering service worker. jobID=%" PRIu64, jobData.identifier().jobIdentifier.toUInt64());
</del><ins>+    CONTAINER_RELEASE_LOG("addRegistration: Registering service worker. jobID=%" PRIu64, jobData.identifier().jobIdentifier.toUInt64());
</ins><span class="cx"> 
</span><span class="cx">     jobData.clientCreationURL = context->url();
</span><span class="cx">     jobData.topOrigin = context->topOrigin().data();
</span><span class="lines">@@ -198,7 +198,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("unregisterRegistration: Unregistering service worker.");
</del><ins>+    CONTAINER_RELEASE_LOG("unregisterRegistration: Unregistering service worker.");
</ins><span class="cx">     m_swConnection->scheduleUnregisterJobInServer(registrationIdentifier, contextIdentifier(), [promise = WTFMove(promise)](auto&& result) mutable {
</span><span class="cx">         promise.settle(WTFMove(result));
</span><span class="cx">     });
</span><span class="lines">@@ -225,7 +225,7 @@
</span><span class="cx">     jobData.scopeURL = scopeURL;
</span><span class="cx">     jobData.scriptURL = scriptURL;
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("removeRegistration: Updating service worker. jobID=%" PRIu64, jobData.identifier().jobIdentifier.toUInt64());
</del><ins>+    CONTAINER_RELEASE_LOG("removeRegistration: Updating service worker. jobID=%" PRIu64, jobData.identifier().jobIdentifier.toUInt64());
</ins><span class="cx"> 
</span><span class="cx">     scheduleJob(makeUnique<ServiceWorkerJob>(*this, WTFMove(promise), WTFMove(jobData)));
</span><span class="cx"> }
</span><span class="lines">@@ -330,7 +330,7 @@
</span><span class="cx">         destroyJob(job);
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("jobFailedWithException: Job %" PRIu64 " failed with error %s", job.identifier().toUInt64(), exception.message().utf8().data());
</del><ins>+    CONTAINER_RELEASE_LOG_ERROR("jobFailedWithException: Job %" PRIu64 " failed with error %s", job.identifier().toUInt64(), exception.message().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     auto promise = job.takePromise();
</span><span class="cx">     if (!promise)
</span><span class="lines">@@ -355,10 +355,10 @@
</span><span class="cx">     ASSERT_WITH_MESSAGE(job.hasPromise() || job.data().type == ServiceWorkerJobType::Update, "Only soft updates have no promise");
</span><span class="cx"> 
</span><span class="cx">     if (job.data().type == ServiceWorkerJobType::Register)
</span><del>-        CONTAINER_RELEASE_LOG_IF_ALLOWED("jobResolvedWithRegistration: Registration job %" PRIu64 " succeeded", job.identifier().toUInt64());
</del><ins>+        CONTAINER_RELEASE_LOG("jobResolvedWithRegistration: Registration job %" PRIu64 " succeeded", job.identifier().toUInt64());
</ins><span class="cx">     else {
</span><span class="cx">         ASSERT(job.data().type == ServiceWorkerJobType::Update);
</span><del>-        CONTAINER_RELEASE_LOG_IF_ALLOWED("jobResolvedWithRegistration: Update job %" PRIu64 " succeeded", job.identifier().toUInt64());
</del><ins>+        CONTAINER_RELEASE_LOG("jobResolvedWithRegistration: Update job %" PRIu64 " succeeded", job.identifier().toUInt64());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto guard = WTF::makeScopeExit([this, &job] {
</span><span class="lines">@@ -382,7 +382,7 @@
</span><span class="cx"> 
</span><span class="cx">         auto registration = ServiceWorkerRegistration::getOrCreate(*scriptExecutionContext(), *this, WTFMove(data));
</span><span class="cx"> 
</span><del>-        CONTAINER_RELEASE_LOG_IF_ALLOWED("jobResolvedWithRegistration: Resolving promise for job %" PRIu64 ". registrationID=%" PRIu64, jobIdentifier.toUInt64(), registration->identifier().toUInt64());
</del><ins>+        CONTAINER_RELEASE_LOG("jobResolvedWithRegistration: Resolving promise for job %" PRIu64 ". registrationID=%" PRIu64, jobIdentifier.toUInt64(), registration->identifier().toUInt64());
</ins><span class="cx"> 
</span><span class="cx">         if (shouldNotifyWhenResolved == ShouldNotifyWhenResolved::Yes) {
</span><span class="cx">             m_ongoingSettledRegistrations.add(++m_lastOngoingSettledRegistrationIdentifier, registration->data().key);
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">         destroyJob(job);
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("jobResolvedWithUnregistrationResult: Unregister job %" PRIu64 " finished. Success? %d", job.identifier().toUInt64(), unregistrationResult);
</del><ins>+    CONTAINER_RELEASE_LOG("jobResolvedWithUnregistrationResult: Unregister job %" PRIu64 " finished. Success? %d", job.identifier().toUInt64(), unregistrationResult);
</ins><span class="cx"> 
</span><span class="cx">     auto* context = scriptExecutionContext();
</span><span class="cx">     if (!context) {
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_creationThread.ptr() == &Thread::current());
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("startScriptFetchForJob: Starting script fetch for job %" PRIu64, job.identifier().toUInt64());
</del><ins>+    CONTAINER_RELEASE_LOG("startScriptFetchForJob: Starting script fetch for job %" PRIu64, job.identifier().toUInt64());
</ins><span class="cx"> 
</span><span class="cx">     auto* context = scriptExecutionContext();
</span><span class="cx">     if (!context) {
</span><span class="lines">@@ -461,7 +461,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_creationThread.ptr() == &Thread::current());
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_IF_ALLOWED("jobFinishedLoadingScript: Successfuly finished fetching script for job %" PRIu64, job.identifier().toUInt64());
</del><ins>+    CONTAINER_RELEASE_LOG("jobFinishedLoadingScript: Successfuly finished fetching script for job %" PRIu64, job.identifier().toUInt64());
</ins><span class="cx"> 
</span><span class="cx">     ensureSWClientConnection().finishFetchingScriptInServer(ServiceWorkerFetchResult { job.data().identifier(), job.data().registrationKey(), script, certificateInfo, contentSecurityPolicy, referrerPolicy, { } });
</span><span class="cx"> }
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx">     ASSERT(m_creationThread.ptr() == &Thread::current());
</span><span class="cx">     ASSERT_WITH_MESSAGE(job.hasPromise() || job.data().type == ServiceWorkerJobType::Update, "Only soft updates have no promise");
</span><span class="cx"> 
</span><del>-    CONTAINER_RELEASE_LOG_ERROR_IF_ALLOWED("jobFinishedLoadingScript: Failed to fetch script for job %" PRIu64 ", error: %s", job.identifier().toUInt64(), error.localizedDescription().utf8().data());
</del><ins>+    CONTAINER_RELEASE_LOG_ERROR("jobFinishedLoadingScript: Failed to fetch script for job %" PRIu64 ", error: %s", job.identifier().toUInt64(), error.localizedDescription().utf8().data());
</ins><span class="cx"> 
</span><span class="cx">     if (auto promise = job.takePromise()) {
</span><span class="cx">         queueTaskKeepingObjectAlive(*this, TaskSource::DOMManipulation, [promise = WTFMove(promise), exception = WTFMove(exception)]() mutable {
</span><span class="lines">@@ -569,21 +569,6 @@
</span><span class="cx">     return iterator->value.job.get();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool ServiceWorkerContainer::isAlwaysOnLoggingAllowed() const
-{
-    auto* context = scriptExecutionContext();
-    if (!context)
-        return false;
-
-    if (is<Document>(*context)) {
-        auto* page = downcast<Document>(*context).page();
-        return page && page->sessionID().isAlwaysOnLoggingAllowed();
-    }
-
-    // FIXME: No logging inside service workers for now.
-    return false;
-}
-
</del><span class="cx"> bool ServiceWorkerContainer::addEventListener(const AtomString& eventType, Ref<EventListener>&& eventListener, const AddEventListenerOptions& options)
</span><span class="cx"> {
</span><span class="cx">     // Setting the onmessage EventHandler attribute on the ServiceWorkerContainer should start the messages
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h    2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h       2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -89,8 +89,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool isStopped() const { return m_isStopped; };
</span><span class="cx"> 
</span><del>-    bool isAlwaysOnLoggingAllowed() const;
-
</del><span class="cx">     NavigatorBase* navigator() { return &m_navigator; }
</span><span class="cx"> 
</span><span class="cx"> private:
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerRegistrationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (278787 => 278788)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp       2021-06-11 22:57:39 UTC (rev 278787)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp  2021-06-11 23:13:05 UTC (rev 278788)
</span><span class="lines">@@ -39,8 +39,8 @@
</span><span class="cx"> #include "WorkerGlobalScope.h"
</span><span class="cx"> #include <wtf/IsoMallocInlines.h>
</span><span class="cx"> 
</span><del>-#define REGISTRATION_RELEASE_LOG_IF_ALLOWED(fmt, ...) RELEASE_LOG_IF(m_container->isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorkerRegistration::" fmt, this, ##__VA_ARGS__)
-#define REGISTRATION_RELEASE_LOG_ERROR_IF_ALLOWED(fmt, ...) RELEASE_LOG_ERROR_IF(m_container->isAlwaysOnLoggingAllowed(), ServiceWorker, "%p - ServiceWorkerRegistration::" fmt, this, ##__VA_ARGS__)
</del><ins>+#define REGISTRATION_RELEASE_LOG(fmt, ...) RELEASE_LOG(ServiceWorker, "%p - ServiceWorkerRegistration::" fmt, this, ##__VA_ARGS__)
+#define REGISTRATION_RELEASE_LOG_ERROR(fmt, ...) RELEASE_LOG_ERROR(ServiceWorker, "%p - ServiceWorkerRegistration::" fmt, this, ##__VA_ARGS__)
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -71,7 +71,7 @@
</span><span class="cx">     if (m_registrationData.activeWorker)
</span><span class="cx">         m_activeWorker = ServiceWorker::getOrCreate(context, WTFMove(*m_registrationData.activeWorker));
</span><span class="cx"> 
</span><del>-    REGISTRATION_RELEASE_LOG_IF_ALLOWED("ServiceWorkerRegistration: ID %llu, installing=%llu, waiting=%llu, active=%llu", identifier().toUInt64(), m_installingWorker ? m_installingWorker->identifier().toUInt64() : 0, m_waitingWorker ? m_waitingWorker->identifier().toUInt64() : 0, m_activeWorker ? m_activeWorker->identifier().toUInt64() : 0);
</del><ins>+    REGISTRATION_RELEASE_LOG("ServiceWorkerRegistration: ID %llu, installing=%llu, waiting=%llu, active=%llu", identifier().toUInt64(), m_installingWorker ? m_installingWorker->identifier().toUInt64() : 0, m_waitingWorker ? m_waitingWorker->identifier().toUInt64() : 0, m_activeWorker ? m_activeWorker->identifier().toUInt64() : 0);
</ins><span class="cx"> 
</span><span class="cx">     m_container->addRegistration(*this);
</span><span class="cx"> 
</span><span class="lines">@@ -165,15 +165,15 @@
</span><span class="cx"> {
</span><span class="cx">     switch (state) {
</span><span class="cx">     case ServiceWorkerRegistrationState::Installing:
</span><del>-        REGISTRATION_RELEASE_LOG_IF_ALLOWED("updateStateFromServer: Setting registration %llu installing worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</del><ins>+        REGISTRATION_RELEASE_LOG("updateStateFromServer: Setting registration %llu installing worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</ins><span class="cx">         m_installingWorker = WTFMove(serviceWorker);
</span><span class="cx">         break;
</span><span class="cx">     case ServiceWorkerRegistrationState::Waiting:
</span><del>-        REGISTRATION_RELEASE_LOG_IF_ALLOWED("updateStateFromServer: Setting registration %llu waiting worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</del><ins>+        REGISTRATION_RELEASE_LOG("updateStateFromServer: Setting registration %llu waiting worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</ins><span class="cx">         m_waitingWorker = WTFMove(serviceWorker);
</span><span class="cx">         break;
</span><span class="cx">     case ServiceWorkerRegistrationState::Active:
</span><del>-        REGISTRATION_RELEASE_LOG_IF_ALLOWED("updateStateFromServer: Setting registration %llu active worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</del><ins>+        REGISTRATION_RELEASE_LOG("updateStateFromServer: Setting registration %llu active worker to %llu", identifier().toUInt64(), serviceWorker ? serviceWorker->identifier().toUInt64() : 0);
</ins><span class="cx">         m_activeWorker = WTFMove(serviceWorker);
</span><span class="cx">         break;
</span><span class="cx">     }
</span><span class="lines">@@ -184,7 +184,7 @@
</span><span class="cx">     if (isContextStopped())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    REGISTRATION_RELEASE_LOG_IF_ALLOWED("fireUpdateFoundEvent: Firing updatefound event for registration %llu", identifier().toUInt64());
</del><ins>+    REGISTRATION_RELEASE_LOG("fireUpdateFoundEvent: Firing updatefound event for registration %llu", identifier().toUInt64());
</ins><span class="cx"> 
</span><span class="cx">     queueTaskToDispatchEvent(*this, TaskSource::DOMManipulation, Event::create(eventNames().updatefoundEvent, Event::CanBubble::No, Event::IsCancelable::No));
</span><span class="cx"> }
</span></span></pre>
</div>
</div>

</body>
</html>