<!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>[287066] 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/287066">287066</a></dd>
<dt>Author</dt> <dd>graouts@webkit.org</dd>
<dt>Date</dt> <dd>2021-12-15 01:16:02 -0800 (Wed, 15 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>ActiveDOMObject::suspendIfNeeded() should not be called within constructors
https://bugs.webkit.org/show_bug.cgi?id=233945

Reviewed by Chris Dumez and Darin Adler.

* Modules/applepay/ApplePaySession.cpp:
(WebCore::ApplePaySession::create):
* Modules/applepay/ApplePaySetup.cpp:
(WebCore::ApplePaySetup::create):
(WebCore::ApplePaySetup::ApplePaySetup):
* Modules/applepay/ApplePaySetupWebCore.h:
(WebCore::ApplePaySetup::create): Deleted.
* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::create):
(WebCore::DOMCache::DOMCache):
* Modules/cache/DOMCache.h:
* Modules/cache/DOMCacheStorage.cpp:
(WebCore::DOMCacheStorage::create):
(WebCore::DOMCacheStorage::DOMCacheStorage):
* Modules/cache/DOMCacheStorage.h:
(WebCore::DOMCacheStorage::create): Deleted.
* Modules/entriesapi/FileSystemDirectoryReader.cpp:
(WebCore::FileSystemDirectoryReader::create):
(WebCore::FileSystemDirectoryReader::FileSystemDirectoryReader):
* Modules/entriesapi/FileSystemDirectoryReader.h:
* Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:
(WebCore::FileSystemSyncAccessHandle::create):
(WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::create):
* Modules/mediastream/MediaStream.cpp:
(WebCore::MediaStream::create):
(WebCore::MediaStream::MediaStream):
* Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::PaymentRequest::create):
* Modules/remoteplayback/RemotePlayback.cpp:
(WebCore::RemotePlayback::create):
(WebCore::RemotePlayback::RemotePlayback):
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::create):
(WebCore::ScriptProcessorNode::ScriptProcessorNode):
* Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::create):
(WebCore::WebXRSession::WebXRSession):
* Modules/webxr/WebXRSystem.cpp:
(WebCore::WebXRSystem::create):
(WebCore::WebXRSystem::WebXRSystem):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::create):
(WebCore::m_version):
* css/CSSFontSelector.h:
* dom/MessagePort.cpp:
(WebCore::MessagePort::create):
(WebCore::MessagePort::MessagePort):
* workers/WorkerAnimationController.cpp:
(WebCore::WorkerAnimationController::create):
(WebCore::WorkerAnimationController::WorkerAnimationController):
* workers/service/ServiceWorker.cpp:
(WebCore::ServiceWorker::getOrCreate):
(WebCore::ServiceWorker::ServiceWorker):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::getOrCreate):
(WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySessioncpp">trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySetupcpp">trunk/Source/WebCore/Modules/applepay/ApplePaySetup.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesapplepayApplePaySetupWebCoreh">trunk/Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h</a></li>
<li><a href="#trunkSourceWebCoreModulescacheDOMCachecpp">trunk/Source/WebCore/Modules/cache/DOMCache.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulescacheDOMCacheh">trunk/Source/WebCore/Modules/cache/DOMCache.h</a></li>
<li><a href="#trunkSourceWebCoreModulescacheDOMCacheStoragecpp">trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulescacheDOMCacheStorageh">trunk/Source/WebCore/Modules/cache/DOMCacheStorage.h</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemDirectoryReadercpp">trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemDirectoryReaderh">trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfilesystemaccessFileSystemSyncAccessHandlecpp">trunk/Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesgeolocationGeolocationcpp">trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaStreamcpp">trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp">trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulespaymentrequestPaymentRequestcpp">trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesremoteplaybackRemotePlaybackcpp">trunk/Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebaudioScriptProcessorNodecpp">trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebxrWebXRSessioncpp">trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebxrWebXRSystemcpp">trunk/Source/WebCore/Modules/webxr/WebXRSystem.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorcpp">trunk/Source/WebCore/css/CSSFontSelector.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontSelectorh">trunk/Source/WebCore/css/CSSFontSelector.h</a></li>
<li><a href="#trunkSourceWebCoredomMessagePortcpp">trunk/Source/WebCore/dom/MessagePort.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersWorkerAnimationControllercpp">trunk/Source/WebCore/workers/WorkerAnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCoreworkersserviceServiceWorkercpp">trunk/Source/WebCore/workers/service/ServiceWorker.cpp</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 (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/ChangeLog      2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -1,3 +1,69 @@
</span><ins>+2021-12-15  Antoine Quint  <graouts@webkit.org>
+
+        ActiveDOMObject::suspendIfNeeded() should not be called within constructors
+        https://bugs.webkit.org/show_bug.cgi?id=233945
+
+        Reviewed by Chris Dumez and Darin Adler.
+
+        * Modules/applepay/ApplePaySession.cpp:
+        (WebCore::ApplePaySession::create):
+        * Modules/applepay/ApplePaySetup.cpp:
+        (WebCore::ApplePaySetup::create):
+        (WebCore::ApplePaySetup::ApplePaySetup):
+        * Modules/applepay/ApplePaySetupWebCore.h:
+        (WebCore::ApplePaySetup::create): Deleted.
+        * Modules/cache/DOMCache.cpp:
+        (WebCore::DOMCache::create):
+        (WebCore::DOMCache::DOMCache):
+        * Modules/cache/DOMCache.h:
+        * Modules/cache/DOMCacheStorage.cpp:
+        (WebCore::DOMCacheStorage::create):
+        (WebCore::DOMCacheStorage::DOMCacheStorage):
+        * Modules/cache/DOMCacheStorage.h:
+        (WebCore::DOMCacheStorage::create): Deleted.
+        * Modules/entriesapi/FileSystemDirectoryReader.cpp:
+        (WebCore::FileSystemDirectoryReader::create):
+        (WebCore::FileSystemDirectoryReader::FileSystemDirectoryReader):
+        * Modules/entriesapi/FileSystemDirectoryReader.h:
+        * Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp:
+        (WebCore::FileSystemSyncAccessHandle::create):
+        (WebCore::FileSystemSyncAccessHandle::FileSystemSyncAccessHandle):
+        * Modules/geolocation/Geolocation.cpp:
+        (WebCore::Geolocation::create):
+        * Modules/mediastream/MediaStream.cpp:
+        (WebCore::MediaStream::create):
+        (WebCore::MediaStream::MediaStream):
+        * Modules/paymentrequest/PaymentRequest.cpp:
+        (WebCore::PaymentRequest::create):
+        * Modules/remoteplayback/RemotePlayback.cpp:
+        (WebCore::RemotePlayback::create):
+        (WebCore::RemotePlayback::RemotePlayback):
+        * Modules/webaudio/ScriptProcessorNode.cpp:
+        (WebCore::ScriptProcessorNode::create):
+        (WebCore::ScriptProcessorNode::ScriptProcessorNode):
+        * Modules/webxr/WebXRSession.cpp:
+        (WebCore::WebXRSession::create):
+        (WebCore::WebXRSession::WebXRSession):
+        * Modules/webxr/WebXRSystem.cpp:
+        (WebCore::WebXRSystem::create):
+        (WebCore::WebXRSystem::WebXRSystem):
+        * css/CSSFontSelector.cpp:
+        (WebCore::CSSFontSelector::create):
+        (WebCore::m_version):
+        * css/CSSFontSelector.h:
+        * dom/MessagePort.cpp:
+        (WebCore::MessagePort::create):
+        (WebCore::MessagePort::MessagePort):
+        * workers/WorkerAnimationController.cpp:
+        (WebCore::WorkerAnimationController::create):
+        (WebCore::WorkerAnimationController::WorkerAnimationController):
+        * workers/service/ServiceWorker.cpp:
+        (WebCore::ServiceWorker::getOrCreate):
+        (WebCore::ServiceWorker::ServiceWorker):
+        * workers/service/ServiceWorkerRegistration.cpp:
+        (WebCore::ServiceWorkerRegistration::getOrCreate):
+        (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
+
</ins><span class="cx"> 2021-12-15  Diego Pino Garcia  <dpino@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         [GTK][WPE] Build fix for Debian Stable after r287015
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp        2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySession.cpp   2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -333,7 +333,9 @@
</span><span class="cx">     if (convertedPaymentRequest.hasException())
</span><span class="cx">         return convertedPaymentRequest.releaseException();
</span><span class="cx"> 
</span><del>-    return adoptRef(*new ApplePaySession(document, version, convertedPaymentRequest.releaseReturnValue()));
</del><ins>+    auto session = adoptRef(*new ApplePaySession(document, version, convertedPaymentRequest.releaseReturnValue()));
+    session->suspendIfNeeded();
+    return session;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ApplePaySession::ApplePaySession(Document& document, unsigned version, ApplePaySessionPaymentRequest&& paymentRequest)
</span><span class="lines">@@ -342,7 +344,6 @@
</span><span class="cx">     , m_version { version }
</span><span class="cx"> {
</span><span class="cx">     ASSERT(document.page()->paymentCoordinator().supportsVersion(document, version));
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ApplePaySession::~ApplePaySession() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySetupcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySetup.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySetup.cpp  2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySetup.cpp     2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -115,11 +115,17 @@
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref<ApplePaySetup> ApplePaySetup::create(ScriptExecutionContext& context, ApplePaySetupConfiguration&& configuration)
+{
+    auto setup = adoptRef(*new ApplePaySetup(context, WTFMove(configuration)));
+    setup->suspendIfNeeded();
+    return setup;
+}
+
</ins><span class="cx"> ApplePaySetup::ApplePaySetup(ScriptExecutionContext& context, ApplePaySetupConfiguration&& configuration)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_configuration(WTFMove(configuration))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ApplePaySetup::stop()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesapplepayApplePaySetupWebCoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h     2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/applepay/ApplePaySetupWebCore.h        2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -43,10 +43,7 @@
</span><span class="cx"> 
</span><span class="cx"> class ApplePaySetup : public ActiveDOMObject, public RefCounted<ApplePaySetup> {
</span><span class="cx"> public:
</span><del>-    static Ref<ApplePaySetup> create(ScriptExecutionContext& context, ApplePaySetupConfiguration&& configuration)
-    {
-        return adoptRef(*new ApplePaySetup(context, WTFMove(configuration)));
-    }
</del><ins>+    static Ref<ApplePaySetup> create(ScriptExecutionContext&, ApplePaySetupConfiguration&&);
</ins><span class="cx"> 
</span><span class="cx">     using SetupFeaturesPromise = DOMPromiseDeferred<IDLSequence<IDLInterface<ApplePaySetupFeature>>>;
</span><span class="cx">     void getSetupFeatures(Document&, SetupFeaturesPromise&&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheDOMCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/DOMCache.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/DOMCache.cpp  2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/cache/DOMCache.cpp     2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -40,6 +40,13 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> using namespace WebCore::DOMCacheEngine;
</span><span class="cx"> 
</span><ins>+Ref<DOMCache> DOMCache::create(ScriptExecutionContext& context, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&& connection)
+{
+    auto cache = adoptRef(*new DOMCache(context, WTFMove(name), identifier, WTFMove(connection)));
+    cache->suspendIfNeeded();
+    return cache;
+}
+
</ins><span class="cx"> DOMCache::DOMCache(ScriptExecutionContext& context, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&& connection)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_name(WTFMove(name))
</span><span class="lines">@@ -46,7 +53,6 @@
</span><span class="cx">     , m_identifier(identifier)
</span><span class="cx">     , m_connection(WTFMove(connection))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx">     m_connection->reference(m_identifier);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheDOMCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/DOMCache.h (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/DOMCache.h    2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/cache/DOMCache.h       2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMCache final : public RefCounted<DOMCache>, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMCache> create(ScriptExecutionContext& context, String&& name, uint64_t identifier, Ref<CacheStorageConnection>&& connection) { return adoptRef(*new DOMCache(context, WTFMove(name), identifier, WTFMove(connection))); }
</del><ins>+    static Ref<DOMCache> create(ScriptExecutionContext&, String&&, uint64_t, Ref<CacheStorageConnection>&&);
</ins><span class="cx">     ~DOMCache();
</span><span class="cx"> 
</span><span class="cx">     using RequestInfo = FetchRequest::Info;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheDOMCacheStoragecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp   2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/cache/DOMCacheStorage.cpp      2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -36,11 +36,17 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+Ref<DOMCacheStorage> DOMCacheStorage::create(ScriptExecutionContext& context, Ref<CacheStorageConnection>&& connection)
+{
+    auto cacheStorage = adoptRef(*new DOMCacheStorage(context, WTFMove(connection)));
+    cacheStorage->suspendIfNeeded();
+    return cacheStorage;
+}
+
</ins><span class="cx"> DOMCacheStorage::DOMCacheStorage(ScriptExecutionContext& context, Ref<CacheStorageConnection>&& connection)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_connection(WTFMove(connection))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DOMCacheStorage::~DOMCacheStorage() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulescacheDOMCacheStorageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/cache/DOMCacheStorage.h (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/cache/DOMCacheStorage.h     2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/cache/DOMCacheStorage.h        2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> 
</span><span class="cx"> class DOMCacheStorage : public RefCounted<DOMCacheStorage>, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>-    static Ref<DOMCacheStorage> create(ScriptExecutionContext& context, Ref<CacheStorageConnection>&& connection) { return adoptRef(*new DOMCacheStorage(context, WTFMove(connection))); }
</del><ins>+    static Ref<DOMCacheStorage> create(ScriptExecutionContext&, Ref<CacheStorageConnection>&&);
</ins><span class="cx">     ~DOMCacheStorage();
</span><span class="cx"> 
</span><span class="cx">     using KeysPromise = DOMPromiseDeferred<IDLSequence<IDLDOMString>>;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemDirectoryReadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp    2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.cpp       2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -41,11 +41,17 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(FileSystemDirectoryReader);
</span><span class="cx"> 
</span><ins>+Ref<FileSystemDirectoryReader> FileSystemDirectoryReader::create(ScriptExecutionContext& context, FileSystemDirectoryEntry& directory)
+{
+    auto reader = adoptRef(*new FileSystemDirectoryReader(context, directory));
+    reader->suspendIfNeeded();
+    return reader;
+}
+
</ins><span class="cx"> FileSystemDirectoryReader::FileSystemDirectoryReader(ScriptExecutionContext& context, FileSystemDirectoryEntry& directory)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_directory(directory)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemDirectoryReader::~FileSystemDirectoryReader() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemDirectoryReaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h      2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryReader.h 2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -41,10 +41,7 @@
</span><span class="cx"> class FileSystemDirectoryReader final : public ScriptWrappable, public ActiveDOMObject, public RefCounted<FileSystemDirectoryReader> {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(FileSystemDirectoryReader);
</span><span class="cx"> public:
</span><del>-    static Ref<FileSystemDirectoryReader> create(ScriptExecutionContext& context, FileSystemDirectoryEntry& directory)
-    {
-        return adoptRef(*new FileSystemDirectoryReader(context, directory));
-    }
</del><ins>+    static Ref<FileSystemDirectoryReader> create(ScriptExecutionContext&, FileSystemDirectoryEntry&);
</ins><span class="cx"> 
</span><span class="cx">     ~FileSystemDirectoryReader();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfilesystemaccessFileSystemSyncAccessHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp     2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/filesystemaccess/FileSystemSyncAccessHandle.cpp        2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -37,7 +37,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<FileSystemSyncAccessHandle> FileSystemSyncAccessHandle::create(ScriptExecutionContext& context, FileSystemFileHandle& source, FileSystemSyncAccessHandleIdentifier identifier, FileSystem::PlatformFileHandle file)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new FileSystemSyncAccessHandle(context, source, identifier, file));
</del><ins>+    auto handle = adoptRef(*new FileSystemSyncAccessHandle(context, source, identifier, file));
+    handle->suspendIfNeeded();
+    return handle;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemSyncAccessHandle::FileSystemSyncAccessHandle(ScriptExecutionContext& context, FileSystemFileHandle& source, FileSystemSyncAccessHandleIdentifier identifier, FileSystem::PlatformFileHandle file)
</span><span class="lines">@@ -47,7 +49,6 @@
</span><span class="cx">     , m_file(file)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_file != FileSystem::invalidPlatformFileHandle);
</span><del>-    suspendIfNeeded();
</del><span class="cx"> 
</span><span class="cx">     m_source->registerSyncAccessHandle(m_identifier, *this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesgeolocationGeolocationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp 2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/geolocation/Geolocation.cpp    2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> Ref<Geolocation> Geolocation::create(Navigator& navigator)
</span><span class="cx"> {
</span><span class="cx">     auto geolocation = adoptRef(*new Geolocation(navigator));
</span><del>-    geolocation.get().suspendIfNeeded();
</del><ins>+    geolocation->suspendIfNeeded();
</ins><span class="cx">     return geolocation;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp 2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStream.cpp    2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -50,17 +50,23 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<MediaStream> MediaStream::create(Document& document, MediaStream& stream)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new MediaStream(document, stream.getTracks()));
</del><ins>+    auto mediaStream = adoptRef(*new MediaStream(document, stream.getTracks()));
+    mediaStream->suspendIfNeeded();
+    return mediaStream;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref<MediaStream> MediaStream::create(Document& document, const MediaStreamTrackVector& tracks)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new MediaStream(document, tracks));
</del><ins>+    auto mediaStream = adoptRef(*new MediaStream(document, tracks));
+    mediaStream->suspendIfNeeded();
+    return mediaStream;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref<MediaStream> MediaStream::create(Document& document, Ref<MediaStreamPrivate>&& streamPrivate)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new MediaStream(document, WTFMove(streamPrivate)));
</del><ins>+    auto mediaStream = adoptRef(*new MediaStream(document, WTFMove(streamPrivate)));
+    mediaStream->suspendIfNeeded();
+    return mediaStream;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline MediaStreamTrackPrivateVector createTrackPrivateVector(const MediaStreamTrackVector& tracks)
</span><span class="lines">@@ -82,7 +88,6 @@
</span><span class="cx"> 
</span><span class="cx">     setIsActive(m_private->active());
</span><span class="cx">     m_private->addObserver(*this);
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaStream::MediaStream(Document& document, Ref<MediaStreamPrivate>&& streamPrivate)
</span><span class="lines">@@ -96,7 +101,6 @@
</span><span class="cx"> 
</span><span class="cx">     setIsActive(m_private->active());
</span><span class="cx">     m_private->addObserver(*this);
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MediaStream::~MediaStream()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp       2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp  2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     m_backend->onTonePlayed([this](const String&) {
</span><span class="cx">         onTonePlayed();
</span><span class="cx">     });
</span><ins>+
</ins><span class="cx">     suspendIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulespaymentrequestPaymentRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp   2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp      2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -344,7 +344,9 @@
</span><span class="cx">         return detailsResult.releaseException();
</span><span class="cx"> 
</span><span class="cx">     auto shippingOptionAndModifierData = detailsResult.releaseReturnValue();
</span><del>-    return adoptRef(*new PaymentRequest(document, WTFMove(options), WTFMove(details), WTFMove(std::get<1>(shippingOptionAndModifierData)), WTFMove(serializedMethodData), WTFMove(std::get<0>(shippingOptionAndModifierData))));
</del><ins>+    auto request = adoptRef(*new PaymentRequest(document, WTFMove(options), WTFMove(details), WTFMove(std::get<1>(shippingOptionAndModifierData)), WTFMove(serializedMethodData), WTFMove(std::get<0>(shippingOptionAndModifierData))));
+    request->suspendIfNeeded();
+    return request;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool PaymentRequest::enabledForContext(ScriptExecutionContext& context)
</span><span class="lines">@@ -360,7 +362,6 @@
</span><span class="cx">     , m_serializedMethodData { WTFMove(serializedMethodData) }
</span><span class="cx">     , m_shippingOption { WTFMove(selectedShippingOption) }
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PaymentRequest::~PaymentRequest()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesremoteplaybackRemotePlaybackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp   2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/remoteplayback/RemotePlayback.cpp      2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -45,7 +45,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<RemotePlayback> RemotePlayback::create(HTMLMediaElement& element)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new RemotePlayback(element));
</del><ins>+    auto remotePlayback = adoptRef(*new RemotePlayback(element));
+    remotePlayback->suspendIfNeeded();
+    return remotePlayback;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemotePlayback::RemotePlayback(HTMLMediaElement& element)
</span><span class="lines">@@ -52,7 +54,6 @@
</span><span class="cx">     : WebCore::ActiveDOMObject(element.scriptExecutionContext())
</span><span class="cx">     , m_mediaElement(element)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemotePlayback::~RemotePlayback()
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebaudioScriptProcessorNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp    2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/webaudio/ScriptProcessorNode.cpp       2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -47,7 +47,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<ScriptProcessorNode> ScriptProcessorNode::create(BaseAudioContext& context, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new ScriptProcessorNode(context, bufferSize, numberOfInputChannels, numberOfOutputChannels));
</del><ins>+    auto node = adoptRef(*new ScriptProcessorNode(context, bufferSize, numberOfInputChannels, numberOfOutputChannels));
+    node->suspendIfNeeded();
+    return node;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScriptProcessorNode::ScriptProcessorNode(BaseAudioContext& context, size_t bufferSize, unsigned numberOfInputChannels, unsigned numberOfOutputChannels)
</span><span class="lines">@@ -69,7 +71,6 @@
</span><span class="cx">     addOutput(numberOfOutputChannels);
</span><span class="cx"> 
</span><span class="cx">     initialize();
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScriptProcessorNode::~ScriptProcessorNode()
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebxrWebXRSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp      2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/webxr/WebXRSession.cpp 2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -47,7 +47,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<WebXRSession> WebXRSession::create(Document& document, WebXRSystem& system, XRSessionMode mode, PlatformXR::Device& device, FeatureList&& requestedFeatures)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new WebXRSession(document, system, mode, device, WTFMove(requestedFeatures)));
</del><ins>+    auto session = adoptRef(*new WebXRSession(document, system, mode, device, WTFMove(requestedFeatures)));
+    session->suspendIfNeeded();
+    return session;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebXRSession::WebXRSession(Document& document, WebXRSystem& system, XRSessionMode mode, PlatformXR::Device& device, FeatureList&& requestedFeatures)
</span><span class="lines">@@ -68,8 +70,6 @@
</span><span class="cx">     // https://immersive-web.github.io/webxr/#ref-for-dom-xrreferencespacetype-viewer%E2%91%A2
</span><span class="cx">     // Every session MUST support viewer XRReferenceSpaces.
</span><span class="cx">     m_device->initializeReferenceSpace(XRReferenceSpaceType::Viewer);
</span><del>-
-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebXRSession::~WebXRSession()
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebxrWebXRSystemcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webxr/WebXRSystem.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webxr/WebXRSystem.cpp       2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/Modules/webxr/WebXRSystem.cpp  2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -56,7 +56,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<WebXRSystem> WebXRSystem::create(Navigator& navigator)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new WebXRSystem(navigator));
</del><ins>+    auto system = adoptRef(*new WebXRSystem(navigator));
+    system->suspendIfNeeded();
+    return system;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebXRSystem::WebXRSystem(Navigator& navigator)
</span><span class="lines">@@ -65,7 +67,6 @@
</span><span class="cx">     , m_defaultInlineDevice(*navigator.scriptExecutionContext())
</span><span class="cx"> {
</span><span class="cx">     m_inlineXRDevice = m_defaultInlineDevice;
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebXRSystem::~WebXRSystem() = default;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.cpp     2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/css/CSSFontSelector.cpp        2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -62,6 +62,13 @@
</span><span class="cx"> 
</span><span class="cx"> static unsigned fontSelectorId;
</span><span class="cx"> 
</span><ins>+Ref<CSSFontSelector> CSSFontSelector::create(ScriptExecutionContext& context)
+{
+    auto fontSelector = adoptRef(*new CSSFontSelector(context));
+    fontSelector->suspendIfNeeded();
+    return fontSelector;
+}
+
</ins><span class="cx"> CSSFontSelector::CSSFontSelector(ScriptExecutionContext& context)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_context(context)
</span><span class="lines">@@ -83,8 +90,6 @@
</span><span class="cx">     FontCache::forCurrentThread().addClient(*this);
</span><span class="cx">     m_cssFontFaceSet->addFontModifiedObserver(m_fontModifiedObserver);
</span><span class="cx">     LOG(Fonts, "CSSFontSelector %p ctor", this);
</span><del>-
-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> CSSFontSelector::~CSSFontSelector()
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontSelectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontSelector.h (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontSelector.h       2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/css/CSSFontSelector.h  2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -51,10 +51,7 @@
</span><span class="cx"> 
</span><span class="cx"> class CSSFontSelector final : public FontSelector, public CSSFontFace::Client, public CanMakeWeakPtr<CSSFontSelector>, public ActiveDOMObject {
</span><span class="cx"> public:
</span><del>-    static Ref<CSSFontSelector> create(ScriptExecutionContext& context)
-    {
-        return adoptRef(*new CSSFontSelector(context));
-    }
</del><ins>+    static Ref<CSSFontSelector> create(ScriptExecutionContext&);
</ins><span class="cx">     virtual ~CSSFontSelector();
</span><span class="cx">     
</span><span class="cx">     unsigned version() const final { return m_version; }
</span></span></pre></div>
<a id="trunkSourceWebCoredomMessagePortcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MessagePort.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MessagePort.cpp 2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/dom/MessagePort.cpp    2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -93,7 +93,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<MessagePort> MessagePort::create(ScriptExecutionContext& scriptExecutionContext, const MessagePortIdentifier& local, const MessagePortIdentifier& remote)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new MessagePort(scriptExecutionContext, local, remote));
</del><ins>+    auto messagePort = adoptRef(*new MessagePort(scriptExecutionContext, local, remote));
+    messagePort->suspendIfNeeded();
+    return messagePort;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MessagePort::MessagePort(ScriptExecutionContext& scriptExecutionContext, const MessagePortIdentifier& local, const MessagePortIdentifier& remote)
</span><span class="lines">@@ -110,7 +112,6 @@
</span><span class="cx">     initializeWeakPtrFactory();
</span><span class="cx"> 
</span><span class="cx">     scriptExecutionContext.createdMessagePort(*this);
</span><del>-    suspendIfNeeded();
</del><span class="cx"> 
</span><span class="cx">     // Don't need to call processMessageWithMessagePortsSoon() here, because the port will not be opened until start() is invoked.
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersWorkerAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/WorkerAnimationController.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/WorkerAnimationController.cpp       2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/workers/WorkerAnimationController.cpp  2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -39,7 +39,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<WorkerAnimationController> WorkerAnimationController::create(WorkerGlobalScope& workerGlobalScope)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new WorkerAnimationController(workerGlobalScope));
</del><ins>+    auto controller = adoptRef(*new WorkerAnimationController(workerGlobalScope));
+    controller->suspendIfNeeded();
+    return controller;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WorkerAnimationController::WorkerAnimationController(WorkerGlobalScope& workerGlobalScope)
</span><span class="lines">@@ -47,7 +49,6 @@
</span><span class="cx">     , m_workerGlobalScope(workerGlobalScope)
</span><span class="cx">     , m_animationTimer(*this, &WorkerAnimationController::animationTimerFired)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WorkerAnimationController::~WorkerAnimationController()
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorker.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorker.cpp   2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/workers/service/ServiceWorker.cpp      2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -57,7 +57,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (auto existingServiceWorker = context.serviceWorker(data.identifier))
</span><span class="cx">         return *existingServiceWorker;
</span><del>-    return adoptRef(*new ServiceWorker(context, WTFMove(data)));
</del><ins>+    auto serviceWorker = adoptRef(*new ServiceWorker(context, WTFMove(data)));
+    serviceWorker->suspendIfNeeded();
+    return serviceWorker;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorker::ServiceWorker(ScriptExecutionContext& context, ServiceWorkerData&& data)
</span><span class="lines">@@ -64,8 +66,6 @@
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_data(WTFMove(data))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
-
</del><span class="cx">     context.registerServiceWorker(*this);
</span><span class="cx"> 
</span><span class="cx">     relaxAdoptionRequirement();
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerRegistrationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp (287065 => 287066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp       2021-12-15 09:09:35 UTC (rev 287065)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerRegistration.cpp  2021-12-15 09:16:02 UTC (rev 287066)
</span><span class="lines">@@ -54,7 +54,9 @@
</span><span class="cx">         return *registration;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return adoptRef(*new ServiceWorkerRegistration(context, WTFMove(container), WTFMove(data)));
</del><ins>+    auto registration = adoptRef(*new ServiceWorkerRegistration(context, WTFMove(container), WTFMove(data)));
+    registration->suspendIfNeeded();
+    return registration;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ServiceWorkerRegistration::ServiceWorkerRegistration(ScriptExecutionContext& context, Ref<ServiceWorkerContainer>&& container, ServiceWorkerRegistrationData&& registrationData)
</span><span class="lines">@@ -63,7 +65,6 @@
</span><span class="cx">     , m_container(WTFMove(container))
</span><span class="cx"> {
</span><span class="cx">     LOG(ServiceWorker, "Creating registration %p for registration key %s", this, m_registrationData.key.loggingString().utf8().data());
</span><del>-    suspendIfNeeded();
</del><span class="cx"> 
</span><span class="cx">     if (m_registrationData.installingWorker)
</span><span class="cx">         m_installingWorker = ServiceWorker::getOrCreate(context, WTFMove(*m_registrationData.installingWorker));
</span></span></pre>
</div>
</div>

</body>
</html>