<!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>[287177] 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/287177">287177</a></dd>
<dt>Author</dt> <dd>graouts@webkit.org</dd>
<dt>Date</dt> <dd>2021-12-17 03:58:26 -0800 (Fri, 17 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 Darin Adler.

Step 3 where we convert almost all remaining calls to suspendIfNeeded() in constructors to be in create() methods.
This required adding such a method to ServiceWorkerContainer. The final call left is in the AudioScheduledSourceNode
constructor, but an earlier version of this patch failed a lot of webaudio tests on EWS so I suspect my attempted fix
was wrong.

* Modules/entriesapi/FileSystemDirectoryEntry.cpp:
(WebCore::FileSystemDirectoryEntry::create):
* Modules/entriesapi/FileSystemDirectoryEntry.h:
* Modules/entriesapi/FileSystemEntry.cpp:
(WebCore::FileSystemEntry::FileSystemEntry):
* Modules/entriesapi/FileSystemEntry.h:
* Modules/entriesapi/FileSystemFileEntry.cpp:
(WebCore::FileSystemFileEntry::create):
* Modules/entriesapi/FileSystemFileEntry.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::FetchBodyOwner):
* Modules/fetch/FetchBodyOwner.h:
* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::create):
(WebCore::FetchRequest::clone):
* Modules/fetch/FetchRequest.h:
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::create):
(WebCore::FetchResponse::error):
(WebCore::FetchResponse::redirect):
(WebCore::FetchResponse::fetch):
* Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:
(WebCore::FileSystemDirectoryHandle::create):
* Modules/filesystemaccess/FileSystemFileHandle.cpp:
(WebCore::FileSystemFileHandle::create):
* Modules/filesystemaccess/FileSystemHandle.cpp:
(WebCore::FileSystemHandle::FileSystemHandle):
* Modules/filesystemaccess/FileSystemHandle.h:
* Modules/mediasource/SourceBufferList.cpp:
(WebCore::SourceBufferList::create):
(WebCore::SourceBufferList::SourceBufferList):
* Modules/mediasource/SourceBufferList.h:
* Modules/mediastream/MediaDevices.cpp:
(WebCore::MediaDevices::MediaDevices):
(WebCore::MediaDevices::create):
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::create):
(WebCore::RTCDTMFSender::RTCDTMFSender):
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDtlsTransport.cpp:
(WebCore::RTCDtlsTransport::create):
(WebCore::RTCDtlsTransport::RTCDtlsTransport):
* Modules/mediastream/RTCDtlsTransport.h:
* Modules/mediastream/RTCIceTransport.cpp:
(WebCore::RTCIceTransport::create):
(WebCore::RTCIceTransport::RTCIceTransport):
* Modules/mediastream/RTCIceTransport.h:
(WebCore::RTCIceTransport::create): Deleted.
* Modules/mediastream/RTCRtpSFrameTransform.cpp:
(WebCore::RTCRtpSFrameTransform::create):
(WebCore::RTCRtpSFrameTransform::RTCRtpSFrameTransform):
* Modules/mediastream/RTCRtpSFrameTransform.h:
(WebCore::RTCRtpSFrameTransform::create): Deleted.
* Modules/mediastream/RTCSctpTransport.cpp:
(WebCore::RTCSctpTransport::create):
(WebCore::RTCSctpTransport::RTCSctpTransport):
* Modules/mediastream/RTCSctpTransport.h:
* Modules/paymentrequest/PaymentResponse.cpp:
(WebCore::PaymentResponse::finishConstruction):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext):
* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::databaseContext):
* html/ImageBitmap.cpp:
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::serviceWorker):
* workers/service/ServiceWorkerContainer.cpp:
(WebCore::ServiceWorkerContainer::create):
(WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
* workers/service/ServiceWorkerContainer.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemDirectoryEntrycpp">trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemDirectoryEntryh">trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemEntrycpp">trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemFileEntrycpp">trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesentriesapiFileSystemFileEntryh">trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchBodyOwnercpp">trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchBodyOwnerh">trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchRequestcpp">trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchRequesth">trunk/Source/WebCore/Modules/fetch/FetchRequest.h</a></li>
<li><a href="#trunkSourceWebCoreModulesfetchFetchResponsecpp">trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfilesystemaccessFileSystemDirectoryHandlecpp">trunk/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfilesystemaccessFileSystemFileHandlecpp">trunk/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesfilesystemaccessFileSystemHandlecpp">trunk/Source/WebCore/Modules/filesystemaccess/FileSystemHandle.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceSourceBufferListcpp">trunk/Source/WebCore/Modules/mediasource/SourceBufferList.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediasourceSourceBufferListh">trunk/Source/WebCore/Modules/mediasource/SourceBufferList.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamMediaDevicescpp">trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp">trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDTMFSenderh">trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransportcpp">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCDtlsTransporth">trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCIceTransportcpp">trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCIceTransporth">trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSFrameTransformcpp">trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCRtpSFrameTransformh">trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCSctpTransportcpp">trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCSctpTransporth">trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.h</a></li>
<li><a href="#trunkSourceWebCoreModulespaymentrequestPaymentResponsecpp">trunk/Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebdatabaseDatabaseManagercpp">trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlImageBitmapcpp">trunk/Source/WebCore/html/ImageBitmap.cpp</a></li>
<li><a href="#trunkSourceWebCorepageNavigatorBasecpp">trunk/Source/WebCore/page/NavigatorBase.cpp</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>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/ChangeLog      2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -1,3 +1,86 @@
</span><ins>+2021-12-17  Antoine Quint  <graouts@webkit.org>
+
+        ActiveDOMObject::suspendIfNeeded() should not be called within constructors
+        https://bugs.webkit.org/show_bug.cgi?id=233945
+
+        Reviewed by Darin Adler.
+
+        Step 3 where we convert almost all remaining calls to suspendIfNeeded() in constructors to be in create() methods.
+        This required adding such a method to ServiceWorkerContainer. The final call left is in the AudioScheduledSourceNode
+        constructor, but an earlier version of this patch failed a lot of webaudio tests on EWS so I suspect my attempted fix
+        was wrong.
+
+        * Modules/entriesapi/FileSystemDirectoryEntry.cpp:
+        (WebCore::FileSystemDirectoryEntry::create):
+        * Modules/entriesapi/FileSystemDirectoryEntry.h:
+        * Modules/entriesapi/FileSystemEntry.cpp:
+        (WebCore::FileSystemEntry::FileSystemEntry):
+        * Modules/entriesapi/FileSystemEntry.h:
+        * Modules/entriesapi/FileSystemFileEntry.cpp:
+        (WebCore::FileSystemFileEntry::create):
+        * Modules/entriesapi/FileSystemFileEntry.h:
+        * Modules/fetch/FetchBodyOwner.cpp:
+        (WebCore::FetchBodyOwner::FetchBodyOwner):
+        * Modules/fetch/FetchBodyOwner.h:
+        * Modules/fetch/FetchRequest.cpp:
+        (WebCore::FetchRequest::create):
+        (WebCore::FetchRequest::clone):
+        * Modules/fetch/FetchRequest.h:
+        * Modules/fetch/FetchResponse.cpp:
+        (WebCore::FetchResponse::create):
+        (WebCore::FetchResponse::error):
+        (WebCore::FetchResponse::redirect):
+        (WebCore::FetchResponse::fetch):
+        * Modules/filesystemaccess/FileSystemDirectoryHandle.cpp:
+        (WebCore::FileSystemDirectoryHandle::create):
+        * Modules/filesystemaccess/FileSystemFileHandle.cpp:
+        (WebCore::FileSystemFileHandle::create):
+        * Modules/filesystemaccess/FileSystemHandle.cpp:
+        (WebCore::FileSystemHandle::FileSystemHandle):
+        * Modules/filesystemaccess/FileSystemHandle.h:
+        * Modules/mediasource/SourceBufferList.cpp:
+        (WebCore::SourceBufferList::create):
+        (WebCore::SourceBufferList::SourceBufferList):
+        * Modules/mediasource/SourceBufferList.h:
+        * Modules/mediastream/MediaDevices.cpp:
+        (WebCore::MediaDevices::MediaDevices):
+        (WebCore::MediaDevices::create):
+        * Modules/mediastream/RTCDTMFSender.cpp:
+        (WebCore::RTCDTMFSender::create):
+        (WebCore::RTCDTMFSender::RTCDTMFSender):
+        * Modules/mediastream/RTCDTMFSender.h:
+        * Modules/mediastream/RTCDtlsTransport.cpp:
+        (WebCore::RTCDtlsTransport::create):
+        (WebCore::RTCDtlsTransport::RTCDtlsTransport):
+        * Modules/mediastream/RTCDtlsTransport.h:
+        * Modules/mediastream/RTCIceTransport.cpp:
+        (WebCore::RTCIceTransport::create):
+        (WebCore::RTCIceTransport::RTCIceTransport):
+        * Modules/mediastream/RTCIceTransport.h:
+        (WebCore::RTCIceTransport::create): Deleted.
+        * Modules/mediastream/RTCRtpSFrameTransform.cpp:
+        (WebCore::RTCRtpSFrameTransform::create):
+        (WebCore::RTCRtpSFrameTransform::RTCRtpSFrameTransform):
+        * Modules/mediastream/RTCRtpSFrameTransform.h:
+        (WebCore::RTCRtpSFrameTransform::create): Deleted.
+        * Modules/mediastream/RTCSctpTransport.cpp:
+        (WebCore::RTCSctpTransport::create):
+        (WebCore::RTCSctpTransport::RTCSctpTransport):
+        * Modules/mediastream/RTCSctpTransport.h:
+        * Modules/paymentrequest/PaymentResponse.cpp:
+        (WebCore::PaymentResponse::finishConstruction):
+        * Modules/webdatabase/DatabaseContext.cpp:
+        (WebCore::DatabaseContext::DatabaseContext):
+        * Modules/webdatabase/DatabaseManager.cpp:
+        (WebCore::DatabaseManager::databaseContext):
+        * html/ImageBitmap.cpp:
+        * page/NavigatorBase.cpp:
+        (WebCore::NavigatorBase::serviceWorker):
+        * workers/service/ServiceWorkerContainer.cpp:
+        (WebCore::ServiceWorkerContainer::create):
+        (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
+        * workers/service/ServiceWorkerContainer.h:
+
</ins><span class="cx"> 2021-12-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION(r287138) [GLIB] Build failure with GCC 8 and 9 in std::array to Span conversion
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemDirectoryEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp     2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.cpp        2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -38,6 +38,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+Ref<FileSystemDirectoryEntry> FileSystemDirectoryEntry::create(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
+{
+    auto result = adoptRef(*new FileSystemDirectoryEntry(context, filesystem, virtualPath));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> FileSystemDirectoryEntry::FileSystemDirectoryEntry(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
</span><span class="cx">     : FileSystemEntry(context, filesystem, virtualPath)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemDirectoryEntryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h       2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemDirectoryEntry.h  2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -36,10 +36,7 @@
</span><span class="cx"> 
</span><span class="cx"> class FileSystemDirectoryEntry final : public FileSystemEntry {
</span><span class="cx"> public:
</span><del>-    static Ref<FileSystemDirectoryEntry> create(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
-    {
-        return adoptRef(*new FileSystemDirectoryEntry(context, filesystem, virtualPath));
-    }
</del><ins>+    static Ref<FileSystemDirectoryEntry> create(ScriptExecutionContext&, DOMFileSystem&, const String&);
</ins><span class="cx"> 
</span><span class="cx">     Ref<FileSystemDirectoryReader> createReader(ScriptExecutionContext&);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemEntry.cpp 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx">     , m_name(FileSystem::pathFileName(virtualPath))
</span><span class="cx">     , m_virtualPath(virtualPath)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemEntry::~FileSystemEntry() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemFileEntrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp  2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp     2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -36,6 +36,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><ins>+Ref<FileSystemFileEntry> FileSystemFileEntry::create(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
+{
+    auto result = adoptRef(*new FileSystemFileEntry(context, filesystem, virtualPath));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> FileSystemFileEntry::FileSystemFileEntry(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
</span><span class="cx">     : FileSystemEntry(context, filesystem, virtualPath)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesentriesapiFileSystemFileEntryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -35,10 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> class FileSystemFileEntry final : public FileSystemEntry {
</span><span class="cx"> public:
</span><del>-    static Ref<FileSystemFileEntry> create(ScriptExecutionContext& context, DOMFileSystem& filesystem, const String& virtualPath)
-    {
-        return adoptRef(*new FileSystemFileEntry(context, filesystem, virtualPath));
-    }
</del><ins>+    static Ref<FileSystemFileEntry> create(ScriptExecutionContext&, DOMFileSystem&, const String&);
</ins><span class="cx"> 
</span><span class="cx">     void file(ScriptExecutionContext&, Ref<FileCallback>&&, RefPtr<ErrorCallback>&& = nullptr);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchBodyOwnercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -46,7 +46,6 @@
</span><span class="cx">     , m_body(WTFMove(body))
</span><span class="cx">     , m_headers(WTFMove(headers))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FetchBodyOwner::~FetchBodyOwner()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchBodyOwnerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx"> 
</span><span class="cx"> class FetchBodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject, public CanMakeWeakPtr<FetchBodyOwner> {
</span><span class="cx"> public:
</span><del>-    FetchBodyOwner(ScriptExecutionContext&, std::optional<FetchBody>&&, Ref<FetchHeaders>&&);
</del><span class="cx">     ~FetchBodyOwner();
</span><span class="cx"> 
</span><span class="cx">     bool bodyUsed() const { return isDisturbed(); }
</span><span class="lines">@@ -73,6 +72,8 @@
</span><span class="cx">     const String& contentType() const { return m_contentType; }
</span><span class="cx"> 
</span><span class="cx"> protected:
</span><ins>+    FetchBodyOwner(ScriptExecutionContext&, std::optional<FetchBody>&&, Ref<FetchHeaders>&&);
+
</ins><span class="cx">     const FetchBody& body() const { return *m_body; }
</span><span class="cx">     FetchBody& body() { return *m_body; }
</span><span class="cx">     bool isBodyNull() const { return !m_body; }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchRequestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -275,6 +275,7 @@
</span><span class="cx"> ExceptionOr<Ref<FetchRequest>> FetchRequest::create(ScriptExecutionContext& context, Info&& input, Init&& init)
</span><span class="cx"> {
</span><span class="cx">     auto request = adoptRef(*new FetchRequest(context, std::nullopt, FetchHeaders::create(FetchHeaders::Guard::Request), { }, { }, { }));
</span><ins>+    request->suspendIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     if (std::holds_alternative<String>(input)) {
</span><span class="cx">         auto result = request->initializeWith(std::get<String>(input), WTFMove(init));
</span><span class="lines">@@ -289,6 +290,13 @@
</span><span class="cx">     return request;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+Ref<FetchRequest> FetchRequest::create(ScriptExecutionContext& context, std::optional<FetchBody>&& body, Ref<FetchHeaders>&& headers, ResourceRequest&& request, FetchOptions&& options, String&& referrer)
+{
+    auto result = adoptRef(*new FetchRequest(context, WTFMove(body), WTFMove(headers), WTFMove(request), WTFMove(options), WTFMove(referrer)));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> String FetchRequest::referrer() const
</span><span class="cx"> {
</span><span class="cx">     if (m_referrer == "no-referrer")
</span><span class="lines">@@ -324,6 +332,7 @@
</span><span class="cx">         return Exception { TypeError, "Body is disturbed or locked"_s };
</span><span class="cx"> 
</span><span class="cx">     auto clone = adoptRef(*new FetchRequest(context, std::nullopt, FetchHeaders::create(m_headers.get()), ResourceRequest { m_request }, FetchOptions { m_options }, String { m_referrer }));
</span><ins>+    clone->suspendIfNeeded();
</ins><span class="cx">     clone->cloneBody(*this);
</span><span class="cx">     clone->setNavigationPreloadIdentifier(m_navigationPreloadIdentifier);
</span><span class="cx">     clone->m_signal->signalFollow(m_signal);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchRequesth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchRequest.h        2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.h   2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     using Redirect = FetchOptions::Redirect;
</span><span class="cx"> 
</span><span class="cx">     static ExceptionOr<Ref<FetchRequest>> create(ScriptExecutionContext&, Info&&, Init&&);
</span><del>-    static Ref<FetchRequest> create(ScriptExecutionContext& context, std::optional<FetchBody>&& body, Ref<FetchHeaders>&& headers, ResourceRequest&& request, FetchOptions&& options, String&& referrer) { return adoptRef(*new FetchRequest(context, WTFMove(body), WTFMove(headers), WTFMove(request), WTFMove(options), WTFMove(referrer))); }
</del><ins>+    static Ref<FetchRequest> create(ScriptExecutionContext&, std::optional<FetchBody>&&, Ref<FetchHeaders>&&, ResourceRequest&&, FetchOptions&&, String&& referrer);
</ins><span class="cx"> 
</span><span class="cx">     const String& method() const { return m_request.httpMethod(); }
</span><span class="cx">     const String& urlString() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfetchFetchResponsecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp     2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp        2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -55,6 +55,7 @@
</span><span class="cx">     auto headers = isOpaque ? FetchHeaders::create(guard) : FetchHeaders::create(guard, HTTPHeaderMap { response.httpHeaderFields() });
</span><span class="cx"> 
</span><span class="cx">     auto fetchResponse = adoptRef(*new FetchResponse(context, WTFMove(body), WTFMove(headers), WTFMove(response)));
</span><ins>+    fetchResponse->suspendIfNeeded();
</ins><span class="cx">     fetchResponse->updateContentType();
</span><span class="cx">     if (!isSynthetic)
</span><span class="cx">         fetchResponse->m_filteredResponse = ResourceResponseBase::filter(fetchResponse->m_internalResponse, ResourceResponse::PerformExposeAllHeadersCheck::Yes);
</span><span class="lines">@@ -127,6 +128,7 @@
</span><span class="cx">     
</span><span class="cx">     // 12. Return r.
</span><span class="cx">     auto r = adoptRef(*new FetchResponse(context, WTFMove(extractedBody), WTFMove(headers), { }));
</span><ins>+    r->suspendIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     r->m_contentType = contentType;
</span><span class="cx">     auto mimeType = extractMIMETypeFromMediaType(contentType);
</span><span class="lines">@@ -142,6 +144,7 @@
</span><span class="cx"> Ref<FetchResponse> FetchResponse::error(ScriptExecutionContext& context)
</span><span class="cx"> {
</span><span class="cx">     auto response = adoptRef(*new FetchResponse(context, { }, FetchHeaders::create(FetchHeaders::Guard::Immutable), { }));
</span><ins>+    response->suspendIfNeeded();
</ins><span class="cx">     response->m_internalResponse.setType(Type::Error);
</span><span class="cx">     return response;
</span><span class="cx"> }
</span><span class="lines">@@ -157,6 +160,7 @@
</span><span class="cx">     if (!ResourceResponse::isRedirectionStatusCode(status))
</span><span class="cx">         return Exception { RangeError, makeString("Status code ", status, "is not a redirection status code") };
</span><span class="cx">     auto redirectResponse = adoptRef(*new FetchResponse(context, { }, FetchHeaders::create(FetchHeaders::Guard::Immutable), { }));
</span><ins>+    redirectResponse->suspendIfNeeded();
</ins><span class="cx">     redirectResponse->m_internalResponse.setHTTPStatusCode(status);
</span><span class="cx">     redirectResponse->m_internalResponse.setHTTPHeaderField(HTTPHeaderName::Location, requestURL.string());
</span><span class="cx">     redirectResponse->m_headers->fastSet(HTTPHeaderName::Location, requestURL.string());
</span><span class="lines">@@ -251,6 +255,7 @@
</span><span class="cx">     InspectorInstrumentation::willFetch(context, request.url().string());
</span><span class="cx"> 
</span><span class="cx">     auto response = adoptRef(*new FetchResponse(context, FetchBody { }, FetchHeaders::create(FetchHeaders::Guard::Immutable), { }));
</span><ins>+    response->suspendIfNeeded();
</ins><span class="cx"> 
</span><span class="cx">     response->body().consumer().setAsLoading();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfilesystemaccessFileSystemDirectoryHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/filesystemaccess/FileSystemDirectoryHandle.cpp 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -39,7 +39,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<FileSystemDirectoryHandle> FileSystemDirectoryHandle::create(ScriptExecutionContext& context, String&& name, FileSystemHandleIdentifier identifier, Ref<FileSystemStorageConnection>&& connection)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new FileSystemDirectoryHandle(context, WTFMove(name), identifier, WTFMove(connection)));
</del><ins>+    auto result = adoptRef(*new FileSystemDirectoryHandle(context, WTFMove(name), identifier, WTFMove(connection)));
+    result->suspendIfNeeded();
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemDirectoryHandle::FileSystemDirectoryHandle(ScriptExecutionContext& context, String&& name, FileSystemHandleIdentifier identifier, Ref<FileSystemStorageConnection>&& connection)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfilesystemaccessFileSystemFileHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp   2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/filesystemaccess/FileSystemFileHandle.cpp      2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,7 +42,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<FileSystemFileHandle> FileSystemFileHandle::create(ScriptExecutionContext& context, String&& name, FileSystemHandleIdentifier identifier, Ref<FileSystemStorageConnection>&& connection)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new FileSystemFileHandle(context, WTFMove(name), identifier, WTFMove(connection)));
</del><ins>+    auto result = adoptRef(*new FileSystemFileHandle(context, WTFMove(name), identifier, WTFMove(connection)));
+    result->suspendIfNeeded();
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemFileHandle::FileSystemFileHandle(ScriptExecutionContext& context, String&& name, FileSystemHandleIdentifier identifier, Ref<FileSystemStorageConnection>&& connection)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesfilesystemaccessFileSystemHandlecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/filesystemaccess/FileSystemHandle.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/filesystemaccess/FileSystemHandle.cpp       2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/filesystemaccess/FileSystemHandle.cpp  2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -41,7 +41,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"> }
</span><span class="cx"> 
</span><span class="cx"> FileSystemHandle::~FileSystemHandle()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceSourceBufferListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/SourceBufferList.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/SourceBufferList.cpp    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBufferList.cpp       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,10 +42,16 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(SourceBufferList);
</span><span class="cx"> 
</span><ins>+Ref<SourceBufferList> SourceBufferList::create(ScriptExecutionContext* context)
+{
+    auto result = adoptRef(*new SourceBufferList(context));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> SourceBufferList::SourceBufferList(ScriptExecutionContext* context)
</span><span class="cx">     : ActiveDOMObject(context)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> SourceBufferList::~SourceBufferList()
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediasourceSourceBufferListh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediasource/SourceBufferList.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediasource/SourceBufferList.h      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediasource/SourceBufferList.h 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -44,10 +44,7 @@
</span><span class="cx"> class SourceBufferList final : public RefCounted<SourceBufferList>, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(SourceBufferList);
</span><span class="cx"> public:
</span><del>-    static Ref<SourceBufferList> create(ScriptExecutionContext* context)
-    {
-        return adoptRef(*new SourceBufferList(context));
-    }
</del><ins>+    static Ref<SourceBufferList> create(ScriptExecutionContext*);
</ins><span class="cx">     virtual ~SourceBufferList();
</span><span class="cx"> 
</span><span class="cx">     unsigned long length() const { return m_list.size(); }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamMediaDevicescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp        2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp   2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -59,8 +59,6 @@
</span><span class="cx">     , m_eventNames(eventNames())
</span><span class="cx">     , m_groupIdHashSalt(createCanonicalUUIDString())
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
-
</del><span class="cx">     static_assert(static_cast<size_t>(MediaDevices::DisplayCaptureSurfaceType::Monitor) == static_cast<size_t>(RealtimeMediaSourceSettings::DisplaySurfaceType::Monitor), "MediaDevices::DisplayCaptureSurfaceType::Monitor is not equal to RealtimeMediaSourceSettings::DisplaySurfaceType::Monitor as expected");
</span><span class="cx">     static_assert(static_cast<size_t>(MediaDevices::DisplayCaptureSurfaceType::Window) == static_cast<size_t>(RealtimeMediaSourceSettings::DisplaySurfaceType::Window), "MediaDevices::DisplayCaptureSurfaceType::Window is not RealtimeMediaSourceSettings::DisplaySurfaceType::Window as expected");
</span><span class="cx">     static_assert(static_cast<size_t>(MediaDevices::DisplayCaptureSurfaceType::Application) == static_cast<size_t>(RealtimeMediaSourceSettings::DisplaySurfaceType::Application), "MediaDevices::DisplayCaptureSurfaceType::Application is not RealtimeMediaSourceSettings::DisplaySurfaceType::Application as expected");
</span><span class="lines">@@ -81,7 +79,9 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<MediaDevices> MediaDevices::create(Document& document)
</span><span class="cx"> {
</span><del>-    return adoptRef(*new MediaDevices(document));
</del><ins>+    auto result = adoptRef(*new MediaDevices(document));
+    result->suspendIfNeeded();
+    return result;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Document* MediaDevices::document() const
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDTMFSendercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp       2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.cpp  2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,6 +42,13 @@
</span><span class="cx"> static const size_t maxToneDurationMs = 6000;
</span><span class="cx"> static const size_t minInterToneGapMs = 30;
</span><span class="cx"> 
</span><ins>+Ref<RTCDTMFSender> RTCDTMFSender::create(ScriptExecutionContext& context, RTCRtpSender& sender, std::unique_ptr<RTCDTMFSenderBackend>&& backend)
+{
+    auto result = adoptRef(*new RTCDTMFSender(context, sender, WTFMove(backend)));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> RTCDTMFSender::RTCDTMFSender(ScriptExecutionContext& context, RTCRtpSender& sender, std::unique_ptr<RTCDTMFSenderBackend>&& backend)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_toneTimer(*this, &RTCDTMFSender::toneTimerFired)
</span><span class="lines">@@ -51,8 +58,6 @@
</span><span class="cx">     m_backend->onTonePlayed([this](const String&) {
</span><span class="cx">         onTonePlayed();
</span><span class="cx">     });
</span><del>-
-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RTCDTMFSender::~RTCDTMFSender() = default;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDTMFSenderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h 2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDTMFSender.h    2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> class RTCDTMFSender final : public RefCounted<RTCDTMFSender>, public EventTargetWithInlineData, public ActiveDOMObject {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(RTCDTMFSender);
</span><span class="cx"> public:
</span><del>-    static Ref<RTCDTMFSender> create(ScriptExecutionContext& context, RTCRtpSender& sender, std::unique_ptr<RTCDTMFSenderBackend>&& backend) { return adoptRef(* new RTCDTMFSender(context, sender, WTFMove(backend))); }
</del><ins>+    static Ref<RTCDTMFSender> create(ScriptExecutionContext&, RTCRtpSender&, std::unique_ptr<RTCDTMFSenderBackend>&&);
</ins><span class="cx">     virtual ~RTCDTMFSender();
</span><span class="cx"> 
</span><span class="cx">     bool canInsertDTMF() const;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.cpp       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,12 +42,18 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(RTCDtlsTransport);
</span><span class="cx"> 
</span><ins>+Ref<RTCDtlsTransport> RTCDtlsTransport::create(ScriptExecutionContext& context, UniqueRef<RTCDtlsTransportBackend>&& backend, Ref<RTCIceTransport>&& iceTransport)
+{
+    auto result = adoptRef(*new RTCDtlsTransport(context, WTFMove(backend), WTFMove(iceTransport)));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> RTCDtlsTransport::RTCDtlsTransport(ScriptExecutionContext& context, UniqueRef<RTCDtlsTransportBackend>&& backend, Ref<RTCIceTransport>&& iceTransport)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_backend(WTFMove(backend))
</span><span class="cx">     , m_iceTransport(WTFMove(iceTransport))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx">     m_backend->registerClient(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCDtlsTransporth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCDtlsTransport.h 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx"> class RTCDtlsTransport final : public RefCounted<RTCDtlsTransport>, public ActiveDOMObject, public EventTargetWithInlineData, public RTCDtlsTransportBackend::Client {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(RTCDtlsTransport);
</span><span class="cx"> public:
</span><del>-    static Ref<RTCDtlsTransport> create(ScriptExecutionContext& context, UniqueRef<RTCDtlsTransportBackend>&& backend, Ref<RTCIceTransport>&& iceTransport) { return adoptRef(*new RTCDtlsTransport(context, WTFMove(backend), WTFMove(iceTransport))); }
</del><ins>+    static Ref<RTCDtlsTransport> create(ScriptExecutionContext&, UniqueRef<RTCDtlsTransportBackend>&&, Ref<RTCIceTransport>&&);
</ins><span class="cx">     ~RTCDtlsTransport();
</span><span class="cx"> 
</span><span class="cx">     using RefCounted<RTCDtlsTransport>::ref;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCIceTransportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp     2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.cpp        2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -37,12 +37,18 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(RTCIceTransport);
</span><span class="cx"> 
</span><ins>+Ref<RTCIceTransport> RTCIceTransport::create(ScriptExecutionContext& context, UniqueRef<RTCIceTransportBackend>&& backend, RTCPeerConnection& connection)
+{
+    auto result = adoptRef(*new RTCIceTransport(context, WTFMove(backend), connection));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> RTCIceTransport::RTCIceTransport(ScriptExecutionContext& context, UniqueRef<RTCIceTransportBackend>&& backend, RTCPeerConnection& connection)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_backend(WTFMove(backend))
</span><span class="cx">     , m_connection(connection)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx">     m_backend->registerClient(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCIceTransporth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.h       2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCIceTransport.h  2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -49,10 +49,7 @@
</span><span class="cx"> class RTCIceTransport : public RefCounted<RTCIceTransport>, public ActiveDOMObject, public EventTargetWithInlineData, public RTCIceTransportBackend::Client {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(RTCIceTransport);
</span><span class="cx"> public:
</span><del>-    static Ref<RTCIceTransport> create(ScriptExecutionContext& context, UniqueRef<RTCIceTransportBackend>&& backend, RTCPeerConnection& connection)
-    {
-        return adoptRef(*new RTCIceTransport(context, WTFMove(backend), connection));
-    }
</del><ins>+    static Ref<RTCIceTransport> create(ScriptExecutionContext&, UniqueRef<RTCIceTransportBackend>&&, RTCPeerConnection&);
</ins><span class="cx">     ~RTCIceTransport();
</span><span class="cx"> 
</span><span class="cx">     RTCIceTransportState state() const { return m_transportState; }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSFrameTransformcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp       2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.cpp  2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -50,12 +50,17 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(RTCRtpSFrameTransform);
</span><span class="cx"> 
</span><ins>+Ref<RTCRtpSFrameTransform> RTCRtpSFrameTransform::create(ScriptExecutionContext& context, Options options)
+{
+    auto result = adoptRef(*new RTCRtpSFrameTransform(context, options));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> RTCRtpSFrameTransform::RTCRtpSFrameTransform(ScriptExecutionContext& context, Options options)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_transformer(RTCRtpSFrameTransformer::create(options.compatibilityMode))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
-
</del><span class="cx">     m_transformer->setIsEncrypting(options.role == Role::Encrypt);
</span><span class="cx">     m_transformer->setAuthenticationSize(options.authenticationSize);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCRtpSFrameTransformh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h 2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCRtpSFrameTransform.h    2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx">         CompatibilityMode compatibilityMode { CompatibilityMode::None };
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    static Ref<RTCRtpSFrameTransform> create(ScriptExecutionContext& context, Options options) { return adoptRef(*new RTCRtpSFrameTransform(context, options)); }
</del><ins>+    static Ref<RTCRtpSFrameTransform> create(ScriptExecutionContext&, Options);
</ins><span class="cx">     ~RTCRtpSFrameTransform();
</span><span class="cx"> 
</span><span class="cx">     void setEncryptionKey(CryptoKey&, std::optional<uint64_t>, DOMPromiseDeferred<void>&&);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCSctpTransportcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.cpp    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.cpp       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -38,12 +38,18 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(RTCSctpTransport);
</span><span class="cx"> 
</span><ins>+Ref<RTCSctpTransport> RTCSctpTransport::create(ScriptExecutionContext& context, UniqueRef<RTCSctpTransportBackend>&& backend, Ref<RTCDtlsTransport>&& transport)
+{
+    auto result = adoptRef(*new RTCSctpTransport(context, WTFMove(backend), WTFMove(transport)));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> RTCSctpTransport::RTCSctpTransport(ScriptExecutionContext& context, UniqueRef<RTCSctpTransportBackend>&& backend, Ref<RTCDtlsTransport >&& transport)
</span><span class="cx">     : ActiveDOMObject(&context)
</span><span class="cx">     , m_backend(WTFMove(backend))
</span><span class="cx">     , m_transport(WTFMove(transport))
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx">     m_backend->registerClient(*this);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCSctpTransporth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.h      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/mediastream/RTCSctpTransport.h 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> class RTCSctpTransport final : public RefCounted<RTCSctpTransport>, public ActiveDOMObject, public EventTargetWithInlineData, public RTCSctpTransportBackend::Client {
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(RTCSctpTransport);
</span><span class="cx"> public:
</span><del>-    static Ref<RTCSctpTransport> create(ScriptExecutionContext& context, UniqueRef<RTCSctpTransportBackend>&& backend, Ref<RTCDtlsTransport>&& transport) { return adoptRef(*new RTCSctpTransport(context, WTFMove(backend), WTFMove(transport))); }
</del><ins>+    static Ref<RTCSctpTransport> create(ScriptExecutionContext&, UniqueRef<RTCSctpTransportBackend>&&, Ref<RTCDtlsTransport>&&);
</ins><span class="cx">     ~RTCSctpTransport();
</span><span class="cx"> 
</span><span class="cx">     using RefCounted<RTCSctpTransport>::ref;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulespaymentrequestPaymentResponsecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp  2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp     2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -42,7 +42,6 @@
</span><span class="cx">     : ActiveDOMObject { context }
</span><span class="cx">     , m_request { request }
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void PaymentResponse::finishConstruction()
</span><span class="lines">@@ -49,6 +48,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!hasPendingActivity());
</span><span class="cx">     m_pendingActivity = makePendingActivity(*this);
</span><ins>+    suspendIfNeeded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> PaymentResponse::~PaymentResponse()
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseContextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp     2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseContext.cpp        2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -97,9 +97,6 @@
</span><span class="cx"> DatabaseContext::DatabaseContext(Document& document)
</span><span class="cx">     : ActiveDOMObject(document)
</span><span class="cx"> {
</span><del>-    // ActiveDOMObject expects this to be called to set internal flags.
-    suspendIfNeeded();
-
</del><span class="cx">     ASSERT(!document.databaseContext());
</span><span class="cx">     document.setDatabaseContext(this);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebdatabaseDatabaseManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp     2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/Modules/webdatabase/DatabaseManager.cpp        2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -102,7 +102,9 @@
</span><span class="cx"> {
</span><span class="cx">     if (auto databaseContext = document.databaseContext())
</span><span class="cx">         return *databaseContext;
</span><del>-    return adoptRef(*new DatabaseContext(document));
</del><ins>+    auto context = adoptRef(*new DatabaseContext(document));
+    context->suspendIfNeeded();
+    return context;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if LOG_DISABLED
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlImageBitmapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/ImageBitmap.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/ImageBitmap.cpp        2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/html/ImageBitmap.cpp   2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -655,6 +655,7 @@
</span><span class="cx">         if (scriptExecutionContext.activeDOMObjectsAreStopped())
</span><span class="cx">             return;
</span><span class="cx">         auto pendingImageBitmap = new PendingImageBitmap(scriptExecutionContext, WTFMove(blob), WTFMove(options), WTFMove(rect), WTFMove(promise));
</span><ins>+        pendingImageBitmap->suspendIfNeeded();
</ins><span class="cx">         pendingImageBitmap->start(scriptExecutionContext);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -668,7 +669,6 @@
</span><span class="cx">         , m_promise(WTFMove(promise))
</span><span class="cx">         , m_createImageBitmapTimer(&scriptExecutionContext, *this, &PendingImageBitmap::createImageBitmapAndResolvePromise)
</span><span class="cx">     {
</span><del>-        suspendIfNeeded();
</del><span class="cx">         m_createImageBitmapTimer.suspendIfNeeded();
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorepageNavigatorBasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/NavigatorBase.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/NavigatorBase.cpp      2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/page/NavigatorBase.cpp 2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -37,6 +37,7 @@
</span><span class="cx"> #include <wtf/Language.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/NumberOfCores.h>
</span><ins>+#include <wtf/UniqueRef.h>
</ins><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="cx"> #if OS(LINUX)
</span><span class="lines">@@ -163,7 +164,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(RuntimeEnabledFeatures::sharedFeatures().serviceWorkerEnabled());
</span><span class="cx">     if (!m_serviceWorkerContainer)
</span><del>-        m_serviceWorkerContainer = makeUnique<ServiceWorkerContainer>(scriptExecutionContext(), *this);
</del><ins>+        m_serviceWorkerContainer = ServiceWorkerContainer::create(scriptExecutionContext(), *this).moveToUniquePtr();
</ins><span class="cx">     return *m_serviceWorkerContainer;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContainercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp  2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.cpp     2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -75,12 +75,17 @@
</span><span class="cx"> 
</span><span class="cx"> WTF_MAKE_ISO_ALLOCATED_IMPL(ServiceWorkerContainer);
</span><span class="cx"> 
</span><ins>+UniqueRef<ServiceWorkerContainer> ServiceWorkerContainer::create(ScriptExecutionContext* context, NavigatorBase& navigator)
+{
+    auto result = UniqueRef(*new ServiceWorkerContainer(context, navigator));
+    result->suspendIfNeeded();
+    return result;
+}
+
</ins><span class="cx"> ServiceWorkerContainer::ServiceWorkerContainer(ScriptExecutionContext* context, NavigatorBase& navigator)
</span><span class="cx">     : ActiveDOMObject(context)
</span><span class="cx">     , m_navigator(navigator)
</span><span class="cx"> {
</span><del>-    suspendIfNeeded();
-    
</del><span class="cx">     // We should queue messages until the DOMContentLoaded event has fired or startMessages() has been called.
</span><span class="cx">     if (is<Document>(context) && downcast<Document>(*context).parsing())
</span><span class="cx">         m_shouldDeferMessageEvents = true;
</span></span></pre></div>
<a id="trunkSourceWebCoreworkersserviceServiceWorkerContainerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h (287176 => 287177)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h    2021-12-17 10:11:36 UTC (rev 287176)
+++ trunk/Source/WebCore/workers/service/ServiceWorkerContainer.h       2021-12-17 11:58:26 UTC (rev 287177)
</span><span class="lines">@@ -40,6 +40,7 @@
</span><span class="cx"> #include "ServiceWorkerRegistration.h"
</span><span class="cx"> #include "ServiceWorkerRegistrationOptions.h"
</span><span class="cx"> #include "WorkerType.h"
</span><ins>+#include <wtf/Forward.h>
</ins><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -57,7 +58,8 @@
</span><span class="cx">     WTF_MAKE_NONCOPYABLE(ServiceWorkerContainer);
</span><span class="cx">     WTF_MAKE_ISO_ALLOCATED(ServiceWorkerContainer);
</span><span class="cx"> public:
</span><del>-    ServiceWorkerContainer(ScriptExecutionContext*, NavigatorBase&);
</del><ins>+    static UniqueRef<ServiceWorkerContainer> create(ScriptExecutionContext*, NavigatorBase&);
+
</ins><span class="cx">     ~ServiceWorkerContainer();
</span><span class="cx"> 
</span><span class="cx">     ServiceWorker* controller() const;
</span><span class="lines">@@ -106,6 +108,8 @@
</span><span class="cx">     void getNavigationPreloadState(ServiceWorkerRegistrationIdentifier, NavigationPreloadStatePromise&&);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><ins>+    ServiceWorkerContainer(ScriptExecutionContext*, NavigatorBase&);
+
</ins><span class="cx">     bool addEventListener(const AtomString& eventType, Ref<EventListener>&&, const AddEventListenerOptions& = { }) final;
</span><span class="cx"> 
</span><span class="cx">     void scheduleJob(std::unique_ptr<ServiceWorkerJob>&&);
</span></span></pre>
</div>
</div>

</body>
</html>