<!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>[277353] trunk</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/277353">277353</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2021-05-11 20:49:57 -0700 (Tue, 11 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, reverting <a href="http://trac.webkit.org/projects/webkit/changeset/277341">r277341</a>.
https://bugs.webkit.org/show_bug.cgi?id=225685

Caused WK2 layout tests to exit with an exception

Reverted changeset:

"Add SPI to suspend / resume a WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=225333
https://trac.webkit.org/changeset/277341</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreHeaderscmake">trunk/Source/WebCore/Headers.cmake</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardCachecpp">trunk/Source/WebCore/history/BackForwardCache.cpp</a></li>
<li><a href="#trunkSourceWebCorehistoryBackForwardCacheh">trunk/Source/WebCore/history/BackForwardCache.h</a></li>
<li><a href="#trunkSourceWebCorehistoryCachedPageh">trunk/Source/WebCore/history/CachedPage.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICWKPagecpp">trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateh">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxyh">trunk/Source/WebKit/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPagecpp">trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPageh">trunk/Source/WebKit/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPagemessagesin">trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj">trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoaProcessSuspensionmm">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitCocoapostMessageregularlyhtml">trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebCore/ChangeLog      2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-05-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r277341.
+        https://bugs.webkit.org/show_bug.cgi?id=225685
+
+        Caused WK2 layout tests to exit with an exception
+
+        Reverted changeset:
+
+        "Add SPI to suspend / resume a WKWebView"
+        https://bugs.webkit.org/show_bug.cgi?id=225333
+        https://trac.webkit.org/changeset/277341
+
</ins><span class="cx"> 2021-05-11  Simon Fraser  <simon.fraser@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Display-frequency animations in ScrollController should be externally driven
</span></span></pre></div>
<a id="trunkSourceWebCoreHeaderscmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Headers.cmake (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Headers.cmake       2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebCore/Headers.cmake  2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -608,7 +608,6 @@
</span><span class="cx">     history/BackForwardItemIdentifier.h
</span><span class="cx">     history/CachedFrame.h
</span><span class="cx">     history/CachedFramePlatformData.h
</span><del>-    history/CachedPage.h
</del><span class="cx">     history/HistoryItem.h
</span><span class="cx"> 
</span><span class="cx">     html/Autocapitalize.h
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardCache.cpp (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardCache.cpp        2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebCore/history/BackForwardCache.cpp   2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -426,62 +426,51 @@
</span><span class="cx">         firePageHideEventRecursively(*child);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr<CachedPage> BackForwardCache::trySuspendPage(Page& page, ForceSuspension forceSuspension)
</del><ins>+bool BackForwardCache::addIfCacheable(HistoryItem& item, Page* page)
</ins><span class="cx"> {
</span><del>-    page.mainFrame().loader().stopForBackForwardCache();
</del><ins>+    if (item.isInBackForwardCache())
+        return false;
</ins><span class="cx"> 
</span><del>-    if (forceSuspension == ForceSuspension::No && !canCache(page))
-        return nullptr;
</del><ins>+    if (!page)
+        return false;
</ins><span class="cx"> 
</span><del>-    ASSERT_WITH_MESSAGE(!page.isUtilityPage(), "Utility pages such as SVGImage pages should never go into BackForwardCache");
</del><ins>+    page->mainFrame().loader().stopForBackForwardCache();
</ins><span class="cx"> 
</span><del>-    setBackForwardCacheState(page, Document::AboutToEnterBackForwardCache);
</del><ins>+    if (!canCache(*page))
+        return false;
</ins><span class="cx"> 
</span><ins>+    ASSERT_WITH_MESSAGE(!page->isUtilityPage(), "Utility pages such as SVGImage pages should never go into BackForwardCache");
+
+    setBackForwardCacheState(*page, Document::AboutToEnterBackForwardCache);
+
</ins><span class="cx">     // Focus the main frame, defocusing a focused subframe (if we have one). We do this here,
</span><span class="cx">     // before the page enters the back/forward cache, while we still can dispatch DOM blur/focus events.
</span><del>-    if (page.focusController().focusedFrame())
-        page.focusController().setFocusedFrame(&page.mainFrame());
</del><ins>+    if (page->focusController().focusedFrame())
+        page->focusController().setFocusedFrame(&page->mainFrame());
</ins><span class="cx"> 
</span><span class="cx">     // Fire the pagehide event in all frames.
</span><del>-    firePageHideEventRecursively(page.mainFrame());
</del><ins>+    firePageHideEventRecursively(page->mainFrame());
</ins><span class="cx"> 
</span><del>-    destroyRenderTree(page.mainFrame());
</del><ins>+    destroyRenderTree(page->mainFrame());
</ins><span class="cx"> 
</span><span class="cx">     // Stop all loads again before checking if we can still cache the page after firing the pagehide
</span><span class="cx">     // event, since the page may have started ping loads in its pagehide event handler.
</span><del>-    page.mainFrame().loader().stopForBackForwardCache();
</del><ins>+    page->mainFrame().loader().stopForBackForwardCache();
</ins><span class="cx"> 
</span><span class="cx">     // Check that the page is still page-cacheable after firing the pagehide event. The JS event handlers
</span><span class="cx">     // could have altered the page in a way that could prevent caching.
</span><del>-    if (forceSuspension == ForceSuspension::No && !canCache(page)) {
-        setBackForwardCacheState(page, Document::NotInBackForwardCache);
-        return nullptr;
</del><ins>+    if (!canCache(*page)) {
+        setBackForwardCacheState(*page, Document::NotInBackForwardCache);
+        return false;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    setBackForwardCacheState(page, Document::InBackForwardCache);
</del><ins>+    setBackForwardCacheState(*page, Document::InBackForwardCache);
</ins><span class="cx"> 
</span><del>-    // Make sure we don't fire any JS events in this scope.
-    ScriptDisallowedScope::InMainThread scriptDisallowedScope;
-    return makeUnique<CachedPage>(page);
-}
-
-bool BackForwardCache::addIfCacheable(HistoryItem& item, Page* page)
-{
-    if (item.isInBackForwardCache())
-        return false;
-
-    if (!page)
-        return false;
-
-    auto cachedPage = trySuspendPage(*page, ForceSuspension::No);
-    if (!cachedPage)
-        return false;
-
</del><span class="cx">     {
</span><span class="cx">         // Make sure we don't fire any JS events in this scope.
</span><span class="cx">         ScriptDisallowedScope::InMainThread scriptDisallowedScope;
</span><span class="cx"> 
</span><del>-        item.setCachedPage(WTFMove(cachedPage));
</del><ins>+        item.setCachedPage(makeUnique<CachedPage>(*page));
</ins><span class="cx">         item.m_pruningReason = PruningReason::None;
</span><span class="cx">         m_items.add(&item);
</span><span class="cx">     }
</span><span class="lines">@@ -492,13 +481,6 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-std::unique_ptr<CachedPage> BackForwardCache::suspendPage(Page& page)
-{
-    RELEASE_LOG(BackForwardCache, "BackForwardCache::suspendPage()");
-
-    return trySuspendPage(page, ForceSuspension::Yes);
-}
-
</del><span class="cx"> std::unique_ptr<CachedPage> BackForwardCache::take(HistoryItem& item, Page* page)
</span><span class="cx"> {
</span><span class="cx">     if (!item.m_cachedPage) {
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryBackForwardCacheh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/BackForwardCache.h (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/BackForwardCache.h  2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebCore/history/BackForwardCache.h     2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx">     WEBCORE_EXPORT void setMaxSize(unsigned); // number of pages to cache.
</span><span class="cx">     unsigned maxSize() const { return m_maxSize; }
</span><span class="cx"> 
</span><del>-    WEBCORE_EXPORT std::unique_ptr<CachedPage> suspendPage(Page&);
</del><span class="cx">     WEBCORE_EXPORT bool addIfCacheable(HistoryItem&, Page*); // Prunes if maxSize() is exceeded.
</span><span class="cx">     WEBCORE_EXPORT void remove(HistoryItem&);
</span><span class="cx">     CachedPage* get(HistoryItem&, Page*);
</span><span class="lines">@@ -75,8 +74,6 @@
</span><span class="cx"> 
</span><span class="cx">     static bool canCachePageContainingThisFrame(Frame&);
</span><span class="cx"> 
</span><del>-    enum class ForceSuspension : bool { No, Yes };
-    std::unique_ptr<CachedPage> trySuspendPage(Page&, ForceSuspension);
</del><span class="cx">     void prune(PruningReason);
</span><span class="cx">     void dump() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorehistoryCachedPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/history/CachedPage.h (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/history/CachedPage.h        2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebCore/history/CachedPage.h   2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -38,9 +38,9 @@
</span><span class="cx">     WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx">     explicit CachedPage(Page&);
</span><del>-    WEBCORE_EXPORT ~CachedPage();
</del><ins>+    ~CachedPage();
</ins><span class="cx"> 
</span><del>-    WEBCORE_EXPORT void restore(Page&);
</del><ins>+    void restore(Page&);
</ins><span class="cx">     void clear();
</span><span class="cx"> 
</span><span class="cx">     Page& page() const { return m_page; }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/ChangeLog       2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-05-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r277341.
+        https://bugs.webkit.org/show_bug.cgi?id=225685
+
+        Caused WK2 layout tests to exit with an exception
+
+        Reverted changeset:
+
+        "Add SPI to suspend / resume a WKWebView"
+        https://bugs.webkit.org/show_bug.cgi?id=225333
+        https://trac.webkit.org/changeset/277341
+
</ins><span class="cx"> 2021-05-11  Wenson Hsieh  <wenson_hsieh@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS] Mail compose web view doesn't scroll to reveal the selection in certain configurations
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp   2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/UIProcess/API/C/WKPage.cpp      2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -143,14 +143,6 @@
</span><span class="cx"> 
</span><span class="cx"> using namespace WebKit;
</span><span class="cx"> 
</span><del>-static NEVER_INLINE void crashIfPageIsSuspended(WKPageRef pageRef)
-{
-    WTFLogAlways("Error: Attempt to call WKPageRef API/SPI on a suspended page, this is a client bug.");
-    RELEASE_ASSERT_WITH_MESSAGE(!pageRef || !toImpl(pageRef)->isSuspended(), "You cannot call this API/SPI on a suspended page");
-}
-
-#define CRASH_IF_SUSPENDED crashIfPageIsSuspended(pageRef)
-
</del><span class="cx"> WKTypeID WKPageGetTypeID()
</span><span class="cx"> {
</span><span class="cx">     return toAPI(WebPageProxy::APIType);
</span><span class="lines">@@ -173,13 +165,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadURL(WKPageRef pageRef, WKURLRef URLRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadURLWithShouldOpenExternalURLsPolicy(WKPageRef pageRef, WKURLRef URLRef, bool shouldOpenExternalURLs)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy = shouldOpenExternalURLs ? WebCore::ShouldOpenExternalURLsPolicy::ShouldAllow : WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow;
</span><span class="cx">     toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), shouldOpenExternalURLsPolicy);
</span><span class="cx"> }
</span><span class="lines">@@ -186,13 +176,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadURLWithUserData(WKPageRef pageRef, WKURLRef URLRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadRequest(URL(URL(), toWTFString(URLRef)), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadURLRequest(WKPageRef pageRef, WKURLRequestRef urlRequestRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     auto resourceRequest = toImpl(urlRequestRef)->resourceRequest();
</span><span class="cx">     toImpl(pageRef)->loadRequest(WTFMove(resourceRequest));
</span><span class="cx"> }
</span><span class="lines">@@ -199,7 +187,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadURLRequestWithUserData(WKPageRef pageRef, WKURLRequestRef urlRequestRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     auto resourceRequest = toImpl(urlRequestRef)->resourceRequest();
</span><span class="cx">     toImpl(pageRef)->loadRequest(WTFMove(resourceRequest), WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow, toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="lines">@@ -206,25 +193,21 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadFile(WKPageRef pageRef, WKURLRef fileURL, WKURLRef resourceDirectoryURL)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadFile(toWTFString(fileURL), toWTFString(resourceDirectoryURL));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadFileWithUserData(WKPageRef pageRef, WKURLRef fileURL, WKURLRef resourceDirectoryURL, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadFile(toWTFString(fileURL), toWTFString(resourceDirectoryURL), toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadData(WKPageRef pageRef, WKDataRef dataRef, WKStringRef MIMETypeRef, WKStringRef encodingRef, WKURLRef baseURLRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadData(toImpl(dataRef)->dataReference(), toWTFString(MIMETypeRef), toWTFString(encodingRef), toWTFString(baseURLRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadDataWithUserData(WKPageRef pageRef, WKDataRef dataRef, WKStringRef MIMETypeRef, WKStringRef encodingRef, WKURLRef baseURLRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadData(toImpl(dataRef)->dataReference(), toWTFString(MIMETypeRef), toWTFString(encodingRef), toWTFString(baseURLRef), toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -250,25 +233,21 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadHTMLString(WKPageRef pageRef, WKStringRef htmlStringRef, WKURLRef baseURLRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WKPageLoadHTMLStringWithUserData(pageRef, htmlStringRef, baseURLRef, nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadHTMLStringWithUserData(WKPageRef pageRef, WKStringRef htmlStringRef, WKURLRef baseURLRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     loadString(pageRef, htmlStringRef, "text/html"_s, toWTFString(baseURLRef), userDataRef);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadAlternateHTMLString(WKPageRef pageRef, WKStringRef htmlStringRef, WKURLRef baseURLRef, WKURLRef unreachableURLRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WKPageLoadAlternateHTMLStringWithUserData(pageRef, htmlStringRef, baseURLRef, unreachableURLRef, nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadAlternateHTMLStringWithUserData(WKPageRef pageRef, WKStringRef htmlStringRef, WKURLRef baseURLRef, WKURLRef unreachableURLRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     String string = toWTFString(htmlStringRef);
</span><span class="cx">     toImpl(pageRef)->loadAlternateHTML(dataFrom(string), encodingOf(string), URL(URL(), toWTFString(baseURLRef)), URL(URL(), toWTFString(unreachableURLRef)), toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="lines">@@ -275,37 +254,31 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadPlainTextString(WKPageRef pageRef, WKStringRef plainTextStringRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WKPageLoadPlainTextStringWithUserData(pageRef, plainTextStringRef, nullptr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadPlainTextStringWithUserData(WKPageRef pageRef, WKStringRef plainTextStringRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     loadString(pageRef, plainTextStringRef, "text/plain"_s, aboutBlankURL().string(), userDataRef);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadWebArchiveData(WKPageRef pageRef, WKDataRef webArchiveDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadWebArchiveData(toImpl(webArchiveDataRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageLoadWebArchiveDataWithUserData(WKPageRef pageRef, WKDataRef webArchiveDataRef, WKTypeRef userDataRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->loadWebArchiveData(toImpl(webArchiveDataRef), toImpl(userDataRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageStopLoading(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->stopLoading();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageReload(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     OptionSet<WebCore::ReloadOption> reloadOptions;
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     if (linkedOnOrAfter(WebCore::SDKVersion::FirstWithExpiredOnlyReloadBehavior))
</span><span class="lines">@@ -317,25 +290,21 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageReloadWithoutContentBlockers(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->reload(WebCore::ReloadOption::DisableContentBlockers);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageReloadFromOrigin(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->reload(WebCore::ReloadOption::FromOrigin);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageReloadExpiredOnly(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->reload(WebCore::ReloadOption::ExpiredOnly);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageTryClose(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     return toImpl(pageRef)->tryClose();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -351,7 +320,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageGoForward(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->goForward();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -362,7 +330,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageGoBack(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     auto& page = *toImpl(pageRef);
</span><span class="cx">     if (page.pageClient().hasSafeBrowsingWarning()) {
</span><span class="cx">         WKPageReload(pageRef);
</span><span class="lines">@@ -378,13 +345,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageGoToBackForwardListItem(WKPageRef pageRef, WKBackForwardListItemRef itemRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->goToBackForwardItem(*toImpl(itemRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageTryRestoreScrollPosition(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->tryRestoreScrollPosition();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -400,7 +365,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageUpdateWebsitePolicies(WKPageRef pageRef, WKWebsitePoliciesRef websitePoliciesRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     RELEASE_ASSERT_WITH_MESSAGE(!toImpl(websitePoliciesRef)->websiteDataStore(), "Setting WebsitePolicies.websiteDataStore is only supported during WKFramePolicyListenerUseWithPolicies().");
</span><span class="cx">     RELEASE_ASSERT_WITH_MESSAGE(!toImpl(websitePoliciesRef)->userContentController(), "Setting WebsitePolicies.userContentController is only supported during WKFramePolicyListenerUseWithPolicies().");
</span><span class="cx">     auto data = toImpl(websitePoliciesRef)->data();
</span><span class="lines">@@ -459,7 +423,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetApplicationNameForUserAgent(WKPageRef pageRef, WKStringRef applicationNameRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setApplicationNameForUserAgent(toWTFString(applicationNameRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -470,7 +433,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetCustomUserAgent(WKPageRef pageRef, WKStringRef userAgentRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setCustomUserAgent(toWTFString(userAgentRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -491,13 +453,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetCustomTextEncodingName(WKPageRef pageRef, WKStringRef encodingNameRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setCustomTextEncodingName(toWTFString(encodingNameRef));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageTerminate(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     Ref<WebProcessProxy> protectedProcessProxy(toImpl(pageRef)->process());
</span><span class="cx">     protectedProcessProxy->requestTermination(ProcessTerminationReason::RequestedByClient);
</span><span class="cx"> }
</span><span class="lines">@@ -558,13 +518,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageRestoreFromSessionState(WKPageRef pageRef, WKTypeRef sessionStateRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     restoreFromSessionState(pageRef, sessionStateRef, true);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageRestoreFromSessionStateWithoutNavigation(WKPageRef pageRef, WKTypeRef sessionStateRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     restoreFromSessionState(pageRef, sessionStateRef, false);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -580,7 +538,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetCustomBackingScaleFactor(WKPageRef pageRef, double customScaleFactor)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setCustomDeviceScaleFactor(customScaleFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -591,7 +548,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetTextZoomFactor(WKPageRef pageRef, double zoomFactor)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setTextZoomFactor(zoomFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -602,19 +558,16 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageZoomFactor(WKPageRef pageRef, double zoomFactor)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setPageZoomFactor(zoomFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageAndTextZoomFactors(WKPageRef pageRef, double pageZoomFactor, double textZoomFactor)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setPageAndTextZoomFactors(pageZoomFactor, textZoomFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetScaleFactor(WKPageRef pageRef, double scale, WKPoint origin)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->scalePage(scale, toIntPoint(origin));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -625,13 +578,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetUseFixedLayout(WKPageRef pageRef, bool fixed)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setUseFixedLayout(fixed);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetFixedLayoutSize(WKPageRef pageRef, WKSize size)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setFixedLayoutSize(toIntSize(size));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -647,7 +598,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageListenForLayoutMilestones(WKPageRef pageRef, WKLayoutMilestones milestones)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->listenForLayoutMilestones(toLayoutMilestones(milestones));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -663,7 +613,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetSuppressScrollbarAnimations(WKPageRef pageRef, bool suppressAnimations)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setSuppressScrollbarAnimations(suppressAnimations);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -699,7 +648,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtLeft(WKPageRef pageRef, bool rubberBandsAtLeft)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setRubberBandsAtLeft(rubberBandsAtLeft);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -710,7 +658,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtRight(WKPageRef pageRef, bool rubberBandsAtRight)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setRubberBandsAtRight(rubberBandsAtRight);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -721,7 +668,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtTop(WKPageRef pageRef, bool rubberBandsAtTop)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setRubberBandsAtTop(rubberBandsAtTop);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -732,7 +678,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetRubberBandsAtBottom(WKPageRef pageRef, bool rubberBandsAtBottom)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setRubberBandsAtBottom(rubberBandsAtBottom);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -743,7 +688,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetEnableVerticalRubberBanding(WKPageRef pageRef, bool enableVerticalRubberBanding)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setEnableVerticalRubberBanding(enableVerticalRubberBanding);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -754,13 +698,11 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetEnableHorizontalRubberBanding(WKPageRef pageRef, bool enableHorizontalRubberBanding)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setEnableHorizontalRubberBanding(enableHorizontalRubberBanding);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetBackgroundExtendsBeyondPage(WKPageRef pageRef, bool backgroundExtendsBeyondPage)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setBackgroundExtendsBeyondPage(backgroundExtendsBeyondPage);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -771,7 +713,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPaginationMode(WKPageRef pageRef, WKPaginationMode paginationMode)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WebCore::Pagination::Mode mode;
</span><span class="cx">     switch (paginationMode) {
</span><span class="cx">     case kWKPaginationModeUnpaginated:
</span><span class="lines">@@ -816,7 +757,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPaginationBehavesLikeColumns(WKPageRef pageRef, bool behavesLikeColumns)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setPaginationBehavesLikeColumns(behavesLikeColumns);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -827,7 +767,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageLength(WKPageRef pageRef, double pageLength)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setPageLength(pageLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -838,7 +777,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetGapBetweenPages(WKPageRef pageRef, double gap)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setGapBetweenPages(gap);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -849,7 +787,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPaginationLineGridEnabled(WKPageRef pageRef, bool lineGridEnabled)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setPaginationLineGridEnabled(lineGridEnabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -880,55 +817,46 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetMaintainsInactiveSelection(WKPageRef pageRef, bool newValue)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     return toImpl(pageRef)->setMaintainsInactiveSelection(newValue);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageCenterSelectionInVisibleArea(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     return toImpl(pageRef)->centerSelectionInVisibleArea();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageFindStringMatches(WKPageRef pageRef, WKStringRef string, WKFindOptions options, unsigned maxMatchCount)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->findStringMatches(toImpl(string)->string(), toFindOptions(options), maxMatchCount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetImageForFindMatch(WKPageRef pageRef, int32_t matchIndex)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getImageForFindMatch(matchIndex);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSelectFindMatch(WKPageRef pageRef, int32_t matchIndex)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->selectFindMatch(matchIndex);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageFindString(WKPageRef pageRef, WKStringRef string, WKFindOptions options, unsigned maxMatchCount)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->findString(toImpl(string)->string(), toFindOptions(options), maxMatchCount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageHideFindUI(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->hideFindUI();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageCountStringMatches(WKPageRef pageRef, WKStringRef string, WKFindOptions options, unsigned maxMatchCount)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->countStringMatches(toImpl(string)->string(), toFindOptions(options), maxMatchCount);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageContextMenuClient(WKPageRef pageRef, const WKPageContextMenuClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx">     class ContextMenuClient final : public API::Client<WKPageContextMenuClientBase>, public API::ContextMenuClient {
</span><span class="cx">     public:
</span><span class="lines">@@ -1045,7 +973,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageFindClient(WKPageRef pageRef, const WKPageFindClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class FindClient : public API::Client<WKPageFindClientBase>, public API::FindClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit FindClient(const WKPageFindClientBase* client)
</span><span class="lines">@@ -1084,7 +1011,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageFindMatchesClient(WKPageRef pageRef, const WKPageFindMatchesClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class FindMatchesClient : public API::Client<WKPageFindMatchesClientBase>, public API::FindMatchesClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit FindMatchesClient(const WKPageFindMatchesClientBase* client)
</span><span class="lines">@@ -1128,19 +1054,16 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageInjectedBundleClient(WKPageRef pageRef, const WKPageInjectedBundleClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setInjectedBundleClient(wkClient);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageFormClient(WKPageRef pageRef, const WKPageFormClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setFormClient(makeUnique<WebFormClient>(wkClient));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageLoaderClient(WKPageRef pageRef, const WKPageLoaderClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class LoaderClient : public API::Client<WKPageLoaderClientBase>, public API::LoaderClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit LoaderClient(const WKPageLoaderClientBase* client)
</span><span class="lines">@@ -1311,7 +1234,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPagePolicyClient(WKPageRef pageRef, const WKPagePolicyClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class PolicyClient : public API::Client<WKPagePolicyClientBase>, public API::PolicyClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit PolicyClient(const WKPagePolicyClientBase* client)
</span><span class="lines">@@ -1571,7 +1493,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageUIClient(WKPageRef pageRef, const WKPageUIClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class UIClient : public API::Client<WKPageUIClientBase>, public API::UIClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit UIClient(const WKPageUIClientBase* client)
</span><span class="lines">@@ -2217,7 +2138,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetPageNavigationClient(WKPageRef pageRef, const WKPageNavigationClientBase* wkClient)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     class NavigationClient : public API::Client<WKPageNavigationClientBase>, public API::NavigationClient {
</span><span class="cx">     public:
</span><span class="cx">         explicit NavigationClient(const WKPageNavigationClientBase* client)
</span><span class="lines">@@ -2583,18 +2503,16 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-void WKPageSetPageStateClient(WKPageRef pageRef, WKPageStateClientBase* client)
</del><ins>+void WKPageSetPageStateClient(WKPageRef page, WKPageStateClientBase* client)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     if (client)
</span><del>-        toImpl(pageRef)->setPageLoadStateObserver(makeUnique<StateClient>(client));
</del><ins>+        toImpl(page)->setPageLoadStateObserver(makeUnique<StateClient>(client));
</ins><span class="cx">     else
</span><del>-        toImpl(pageRef)->setPageLoadStateObserver(nullptr);
</del><ins>+        toImpl(page)->setPageLoadStateObserver(nullptr);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageRunJavaScriptInMainFrame(WKPageRef pageRef, WKStringRef scriptRef, void* context, WKPageRunJavaScriptFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->runJavaScriptInMainFrame({ toImpl(scriptRef)->string(), URL { }, false, WTF::nullopt, true }, [context, callback] (auto&& result) {
</span><span class="cx">         if (result.has_value())
</span><span class="cx">             callback(toAPI(result.value().get()), nullptr, context);
</span><span class="lines">@@ -2613,7 +2531,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageRunJavaScriptInMainFrame_b(WKPageRef pageRef, WKStringRef scriptRef, WKPageRunJavaScriptBlock block)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WKPageRunJavaScriptInMainFrame(pageRef, scriptRef, Block_copy(block), callRunJavaScriptBlockAndRelease);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="lines">@@ -2627,37 +2544,31 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageRenderTreeExternalRepresentation(WKPageRef pageRef, void* context, WKPageRenderTreeExternalRepresentationFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getRenderTreeExternalRepresentation(toStringCallback(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetSourceForFrame(WKPageRef pageRef, WKFrameRef frameRef, void* context, WKPageGetSourceForFrameFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getSourceForFrame(toImpl(frameRef), toStringCallback(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetContentsAsString(WKPageRef pageRef, void* context, WKPageGetContentsAsStringFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getContentsAsString(ContentAsStringIncludesChildFrames::No, toStringCallback(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetBytecodeProfile(WKPageRef pageRef, void* context, WKPageGetBytecodeProfileFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getBytecodeProfile(toStringCallback(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetSamplingProfilerOutput(WKPageRef pageRef, void* context, WKPageGetSamplingProfilerOutputFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getSamplingProfilerOutput(toStringCallback(context, callback));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetSelectionAsWebArchiveData(WKPageRef pageRef, void* context, WKPageGetSelectionAsWebArchiveDataFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->getSelectionAsWebArchiveData([context, callback] (API::Data* data) {
</span><span class="cx">         callback(toAPI(data), nullptr, context);
</span><span class="cx">     });
</span><span class="lines">@@ -2665,7 +2576,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageGetContentsAsMHTMLData(WKPageRef pageRef, void* context, WKPageGetContentsAsMHTMLDataFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(MHTML)
</span><span class="cx">     toImpl(pageRef)->getContentsAsMHTMLData([context, callback] (API::Data* data) {
</span><span class="cx">         callback(toAPI(data), nullptr, context);
</span><span class="lines">@@ -2679,7 +2589,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageForceRepaint(WKPageRef pageRef, void* context, WKPageForceRepaintFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->forceRepaint([context, callback]() {
</span><span class="cx">         callback(nullptr, context);
</span><span class="cx">     });
</span><span class="lines">@@ -2717,7 +2626,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageValidateCommand(WKPageRef pageRef, WKStringRef command, void* context, WKPageValidateCommandCallback callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     auto commandName = toImpl(command)->string();
</span><span class="cx">     toImpl(pageRef)->validateCommand(commandName, [context, callback, commandName](bool isEnabled, int32_t state) {
</span><span class="cx">         callback(toAPI(API::String::create(commandName).ptr()), isEnabled, state, nullptr, context);
</span><span class="lines">@@ -2726,7 +2634,6 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageExecuteCommand(WKPageRef pageRef, WKStringRef command)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->executeEditCommand(toImpl(command)->string());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2739,10 +2646,9 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageComputePagesForPrinting(WKPageRef pageRef, WKFrameRef frame, WKPrintInfo printInfo, WKPageComputePagesForPrintingFunction callback, void* context)
</del><ins>+void WKPageComputePagesForPrinting(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, WKPageComputePagesForPrintingFunction callback, void* context)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->computePagesForPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo), [context, callback](const Vector<WebCore::IntRect>& rects, double scaleFactor, const WebCore::FloatBoxExtent& computedPageMargin) {
</del><ins>+    toImpl(page)->computePagesForPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo), [context, callback](const Vector<WebCore::IntRect>& rects, double scaleFactor, const WebCore::FloatBoxExtent& computedPageMargin) {
</ins><span class="cx">         Vector<WKRect> wkRects(rects.size());
</span><span class="cx">         for (size_t i = 0; i < rects.size(); ++i)
</span><span class="cx">             wkRects[i] = toAPI(rects[i]);
</span><span class="lines">@@ -2751,25 +2657,22 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span><del>-void WKPageDrawPagesToPDF(WKPageRef pageRef, WKFrameRef frame, WKPrintInfo printInfo, uint32_t first, uint32_t count, WKPageDrawToPDFFunction callback, void* context)
</del><ins>+void WKPageDrawPagesToPDF(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo, uint32_t first, uint32_t count, WKPageDrawToPDFFunction callback, void* context)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->drawPagesToPDF(toImpl(frame), printInfoFromWKPrintInfo(printInfo), first, count, [context, callback] (API::Data* data) {
</del><ins>+    toImpl(page)->drawPagesToPDF(toImpl(frame), printInfoFromWKPrintInfo(printInfo), first, count, [context, callback] (API::Data* data) {
</ins><span class="cx">         callback(toAPI(data), nullptr, context);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WKPageBeginPrinting(WKPageRef pageRef, WKFrameRef frame, WKPrintInfo printInfo)
</del><ins>+void WKPageBeginPrinting(WKPageRef page, WKFrameRef frame, WKPrintInfo printInfo)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->beginPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo));
</del><ins>+    toImpl(page)->beginPrinting(toImpl(frame), printInfoFromWKPrintInfo(printInfo));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageEndPrinting(WKPageRef pageRef)
</del><ins>+void WKPageEndPrinting(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->endPrinting();
</del><ins>+    toImpl(page)->endPrinting();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageGetIsControlledByAutomation(WKPageRef page)
</span><span class="lines">@@ -2777,10 +2680,9 @@
</span><span class="cx">     return toImpl(page)->isControlledByAutomation();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetControlledByAutomation(WKPageRef pageRef, bool controlled)
</del><ins>+void WKPageSetControlledByAutomation(WKPageRef page, bool controlled)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setControlledByAutomation(controlled);
</del><ins>+    toImpl(page)->setControlledByAutomation(controlled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageGetAllowsRemoteInspection(WKPageRef page)
</span><span class="lines">@@ -2793,26 +2695,23 @@
</span><span class="cx"> #endif    
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetAllowsRemoteInspection(WKPageRef pageRef, bool allow)
</del><ins>+void WKPageSetAllowsRemoteInspection(WKPageRef page, bool allow)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><del>-    toImpl(pageRef)->setAllowsRemoteInspection(allow);
</del><ins>+    toImpl(page)->setAllowsRemoteInspection(allow);
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx">     UNUSED_PARAM(allow);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetMediaVolume(WKPageRef pageRef, float volume)
</del><ins>+void WKPageSetMediaVolume(WKPageRef page, float volume)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setMediaVolume(volume);
</del><ins>+    toImpl(page)->setMediaVolume(volume);    
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetMuted(WKPageRef pageRef, WKMediaMutedState mutedState)
</del><ins>+void WKPageSetMuted(WKPageRef page, WKMediaMutedState mutedState)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     WebCore::MediaProducer::MutedStateFlags coreState;
</span><span class="cx"> 
</span><span class="cx">     if (mutedState & kWKMediaAudioMuted)
</span><span class="lines">@@ -2822,13 +2721,12 @@
</span><span class="cx">     if (mutedState & kWKMediaScreenCaptureMuted)
</span><span class="cx">         coreState.add(WebCore::MediaProducer::MutedState::ScreenCaptureIsMuted);
</span><span class="cx"> 
</span><del>-    toImpl(pageRef)->setMuted(coreState);
</del><ins>+    toImpl(page)->setMuted(coreState);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetMediaCaptureEnabled(WKPageRef pageRef, bool enabled)
</del><ins>+void WKPageSetMediaCaptureEnabled(WKPageRef page, bool enabled)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setMediaCaptureEnabled(enabled);
</del><ins>+    toImpl(page)->setMediaCaptureEnabled(enabled);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageGetMediaCaptureEnabled(WKPageRef page)
</span><span class="lines">@@ -2836,33 +2734,30 @@
</span><span class="cx">     return toImpl(page)->mediaCaptureEnabled();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageDidAllowPointerLock(WKPageRef pageRef)
</del><ins>+void WKPageDidAllowPointerLock(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><del>-    toImpl(pageRef)->didAllowPointerLock();
</del><ins>+    toImpl(page)->didAllowPointerLock();
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageClearUserMediaState(WKPageRef pageRef)
</del><ins>+void WKPageClearUserMediaState(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(MEDIA_STREAM)
</span><del>-    toImpl(pageRef)->clearUserMediaState();
</del><ins>+    toImpl(page)->clearUserMediaState();
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageDidDenyPointerLock(WKPageRef pageRef)
</del><ins>+void WKPageDidDenyPointerLock(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><del>-    toImpl(pageRef)->didDenyPointerLock();
</del><ins>+    toImpl(page)->didDenyPointerLock();
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2895,18 +2790,16 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageSetMayStartMediaWhenInWindow(WKPageRef pageRef, bool mayStartMedia)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->setMayStartMediaWhenInWindow(mayStartMedia);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-void WKPageSelectContextMenuItem(WKPageRef pageRef, WKContextMenuItemRef item)
</del><ins>+void WKPageSelectContextMenuItem(WKPageRef page, WKContextMenuItemRef item)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><del>-    toImpl(pageRef)->contextMenuItemSelected((toImpl(item)->data()));
</del><ins>+    toImpl(page)->contextMenuItemSelected((toImpl(item)->data()));
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx">     UNUSED_PARAM(item);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -2928,9 +2821,8 @@
</span><span class="cx">     return kWKScrollPinningBehaviorDoNotPin;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetScrollPinningBehavior(WKPageRef pageRef, WKScrollPinningBehavior pinning)
</del><ins>+void WKPageSetScrollPinningBehavior(WKPageRef page, WKScrollPinningBehavior pinning)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     ScrollPinningBehavior corePinning = ScrollPinningBehavior::DoNotPin;
</span><span class="cx"> 
</span><span class="cx">     switch (pinning) {
</span><span class="lines">@@ -2947,7 +2839,7 @@
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    toImpl(pageRef)->setScrollPinningBehavior(corePinning);
</del><ins>+    toImpl(page)->setScrollPinningBehavior(corePinning);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageGetAddsVisitedLinks(WKPageRef page)
</span><span class="lines">@@ -2955,10 +2847,9 @@
</span><span class="cx">     return toImpl(page)->addsVisitedLinks();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetAddsVisitedLinks(WKPageRef pageRef, bool addsVisitedLinks)
</del><ins>+void WKPageSetAddsVisitedLinks(WKPageRef page, bool addsVisitedLinks)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setAddsVisitedLinks(addsVisitedLinks);
</del><ins>+    toImpl(page)->setAddsVisitedLinks(addsVisitedLinks);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WKPageIsPlayingAudio(WKPageRef page)
</span><span class="lines">@@ -2993,23 +2884,20 @@
</span><span class="cx"> 
</span><span class="cx"> void WKPageClearWheelEventTestMonitor(WKPageRef pageRef)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->clearWheelEventTestMonitor();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WKPageCallAfterNextPresentationUpdate(WKPageRef pageRef, void* context, WKPagePostPresentationUpdateFunction callback)
</span><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx">     toImpl(pageRef)->callAfterNextPresentationUpdate([context, callback](WebKit::CallbackBase::Error error) {
</span><span class="cx">         callback(error != WebKit::CallbackBase::Error::None ? toAPI(API::Error::create().ptr()) : 0, context);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetIgnoresViewportScaleLimits(WKPageRef pageRef, bool ignoresViewportScaleLimits)
</del><ins>+void WKPageSetIgnoresViewportScaleLimits(WKPageRef page, bool ignoresViewportScaleLimits)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(META_VIEWPORT)
</span><del>-    toImpl(pageRef)->setForceAlwaysUserScalable(ignoresViewportScaleLimits);
</del><ins>+    toImpl(page)->setForceAlwaysUserScalable(ignoresViewportScaleLimits);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3019,105 +2907,93 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #ifdef __BLOCKS__
</span><del>-void WKPageGetApplicationManifest_b(WKPageRef pageRef, WKPageGetApplicationManifestBlock block)
</del><ins>+void WKPageGetApplicationManifest_b(WKPageRef page, WKPageGetApplicationManifestBlock block)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(APPLICATION_MANIFEST)
</span><del>-    toImpl(pageRef)->getApplicationManifest([block](const Optional<WebCore::ApplicationManifest>& manifest) {
</del><ins>+    toImpl(page)->getApplicationManifest([block](const Optional<WebCore::ApplicationManifest>& manifest) {
</ins><span class="cx">         block();
</span><span class="cx">     });
</span><span class="cx"> #else // ENABLE(APPLICATION_MANIFEST)
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx">     block();
</span><span class="cx"> #endif // not ENABLE(APPLICATION_MANIFEST)
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void WKPageDumpPrivateClickMeasurement(WKPageRef pageRef, WKPageDumpPrivateClickMeasurementFunction callback, void* callbackContext)
</del><ins>+void WKPageDumpPrivateClickMeasurement(WKPageRef page, WKPageDumpPrivateClickMeasurementFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->dumpPrivateClickMeasurement([callbackContext, callback] (const String& privateClickMeasurement) {
</del><ins>+    toImpl(page)->dumpPrivateClickMeasurement([callbackContext, callback] (const String& privateClickMeasurement) {
</ins><span class="cx">         callback(WebKit::toAPI(privateClickMeasurement.impl()), callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageClearPrivateClickMeasurement(WKPageRef pageRef, WKPageClearPrivateClickMeasurementFunction callback, void* callbackContext)
</del><ins>+void WKPageClearPrivateClickMeasurement(WKPageRef page, WKPageClearPrivateClickMeasurementFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->clearPrivateClickMeasurement([callbackContext, callback] () {
</del><ins>+    toImpl(page)->clearPrivateClickMeasurement([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementOverrideTimerForTesting(WKPageRef pageRef, bool value, WKPageSetPrivateClickMeasurementOverrideTimerForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetPrivateClickMeasurementOverrideTimerForTesting(WKPageRef page, bool value, WKPageSetPrivateClickMeasurementOverrideTimerForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setPrivateClickMeasurementOverrideTimerForTesting(value, [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setPrivateClickMeasurementOverrideTimerForTesting(value, [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting(WKPageRef pageRef, WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTesting(WKPageRef page, WKPageMarkAttributedPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->markAttributedPrivateClickMeasurementsAsExpiredForTesting([callbackContext, callback] () {
</del><ins>+    toImpl(page)->markAttributedPrivateClickMeasurementsAsExpiredForTesting([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSimulateResourceLoadStatisticsSessionRestart(WKPageRef pageRef, WKPageSimulateResourceLoadStatisticsSessionRestartFunction callback, void* callbackContext)
</del><ins>+void WKPageSimulateResourceLoadStatisticsSessionRestart(WKPageRef page, WKPageSimulateResourceLoadStatisticsSessionRestartFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->simulateResourceLoadStatisticsSessionRestart([callbackContext, callback] () {
</del><ins>+    toImpl(page)->simulateResourceLoadStatisticsSessionRestart([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTesting(WKPageRef pageRef, WKURLRef URLRef, WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTesting(WKPageRef page, WKURLRef URLRef, WKPageSetPrivateClickMeasurementTokenPublicKeyURLForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setPrivateClickMeasurementTokenPublicKeyURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setPrivateClickMeasurementTokenPublicKeyURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementTokenSignatureURLForTesting(WKPageRef pageRef, WKURLRef URLRef, WKPageSetPrivateClickMeasurementTokenSignatureURLForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetPrivateClickMeasurementTokenSignatureURLForTesting(WKPageRef page, WKURLRef URLRef, WKPageSetPrivateClickMeasurementTokenSignatureURLForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setPrivateClickMeasurementTokenSignatureURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setPrivateClickMeasurementTokenSignatureURLForTesting(URL(URL(), toWTFString(URLRef)), [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting(WKPageRef pageRef, WKURLRef sourceURL, WKURLRef destinationURL, WKPageSetPrivateClickMeasurementAttributionReportURLsForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetPrivateClickMeasurementAttributionReportURLsForTesting(WKPageRef page, WKURLRef sourceURL, WKURLRef destinationURL, WKPageSetPrivateClickMeasurementAttributionReportURLsForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setPrivateClickMeasurementAttributionReportURLsForTesting(URL(URL(), toWTFString(sourceURL)), URL(URL(), toWTFString(destinationURL)), [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setPrivateClickMeasurementAttributionReportURLsForTesting(URL(URL(), toWTFString(sourceURL)), URL(URL(), toWTFString(destinationURL)), [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageMarkPrivateClickMeasurementsAsExpiredForTesting(WKPageRef pageRef, WKPageMarkPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageMarkPrivateClickMeasurementsAsExpiredForTesting(WKPageRef page, WKPageMarkPrivateClickMeasurementsAsExpiredForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->markPrivateClickMeasurementsAsExpiredForTesting([callbackContext, callback] () {
</del><ins>+    toImpl(page)->markPrivateClickMeasurementsAsExpiredForTesting([callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetPCMFraudPreventionValuesForTesting(WKPageRef pageRef, WKStringRef unlinkableToken, WKStringRef secretToken, WKStringRef signature, WKStringRef keyID, WKPageSetPCMFraudPreventionValuesForTestingFunction callback, void* callbackContext)
</del><ins>+void WKPageSetPCMFraudPreventionValuesForTesting(WKPageRef page, WKStringRef unlinkableToken, WKStringRef secretToken, WKStringRef signature, WKStringRef keyID, WKPageSetPCMFraudPreventionValuesForTestingFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setPCMFraudPreventionValuesForTesting(toWTFString(unlinkableToken), toWTFString(secretToken), toWTFString(signature), toWTFString(keyID), [callbackContext, callback] () {
</del><ins>+    toImpl(page)->setPCMFraudPreventionValuesForTesting(toWTFString(unlinkableToken), toWTFString(secretToken), toWTFString(signature), toWTFString(keyID), [callbackContext, callback] () {
</ins><span class="cx">         callback(callbackContext);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetMockCameraOrientation(WKPageRef pageRef, uint64_t orientation)
</del><ins>+void WKPageSetMockCameraOrientation(WKPageRef page, uint64_t orientation)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(COCOA) && ENABLE(MEDIA_STREAM)
</span><del>-    toImpl(pageRef)->setOrientationForMediaCapture(orientation);
</del><ins>+    toImpl(page)->setOrientationForMediaCapture(orientation);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3130,11 +3006,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageLoadedSubresourceDomains(WKPageRef pageRef, WKPageLoadedSubresourceDomainsFunction callback, void* callbackContext)
</del><ins>+void WKPageLoadedSubresourceDomains(WKPageRef page, WKPageLoadedSubresourceDomainsFunction callback, void* callbackContext)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span><del>-    toImpl(pageRef)->getLoadedSubresourceDomains([callbackContext, callback](Vector<RegistrableDomain>&& domains) {
</del><ins>+    toImpl(page)->getLoadedSubresourceDomains([callbackContext, callback](Vector<RegistrableDomain>&& domains) {
</ins><span class="cx">         Vector<RefPtr<API::Object>> apiDomains = WTF::map(domains, [](auto& domain) {
</span><span class="cx">             return RefPtr<API::Object>(API::String::create(WTFMove(domain.string())));
</span><span class="cx">         });
</span><span class="lines">@@ -3141,29 +3016,26 @@
</span><span class="cx">         callback(toAPI(API::Array::create(WTFMove(apiDomains)).ptr()), callbackContext);
</span><span class="cx">     });
</span><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx">     callback(nullptr, callbackContext);
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageClearLoadedSubresourceDomains(WKPageRef pageRef)
</del><ins>+void WKPageClearLoadedSubresourceDomains(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span><del>-    toImpl(pageRef)->clearLoadedSubresourceDomains();
</del><ins>+    toImpl(page)->clearLoadedSubresourceDomains();
</ins><span class="cx"> #else
</span><del>-    UNUSED_PARAM(pageRef);
</del><ins>+    UNUSED_PARAM(page);
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageSetMediaCaptureReportingDelayForTesting(WKPageRef pageRef, double delay)
</del><ins>+void WKPageSetMediaCaptureReportingDelayForTesting(WKPageRef page, double delay)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->setMediaCaptureReportingDelay(Seconds(delay));
</del><ins>+    toImpl(page)->setMediaCaptureReportingDelay(Seconds(delay));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WKPageDispatchActivityStateUpdateForTesting(WKPageRef pageRef)
</del><ins>+void WKPageDispatchActivityStateUpdateForTesting(WKPageRef page)
</ins><span class="cx"> {
</span><del>-    CRASH_IF_SUSPENDED;
-    toImpl(pageRef)->dispatchActivityStateUpdateForTesting();
</del><ins>+    toImpl(page)->dispatchActivityStateUpdateForTesting();
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm     2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm        2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -199,9 +199,6 @@
</span><span class="cx"> static const uint32_t firstSDKVersionWithLinkPreviewEnabledByDefault = 0xA0000;
</span><span class="cx"> #endif // PLATFORM(IOS_FAMILY)
</span><span class="cx"> 
</span><del>-#define THROW_IF_SUSPENDED if (_page && _page->isSuspended()) \
-    [NSException raise:NSInternalInconsistencyException format:@"The WKWebView is suspended"]
-
</del><span class="cx"> RetainPtr<NSError> nsErrorFromExceptionDetails(const WebCore::ExceptionDetails& details)
</span><span class="cx"> {
</span><span class="cx">     auto userInfo = adoptNS([[NSMutableDictionary alloc] init]);
</span><span class="lines">@@ -721,13 +718,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadRequest:(NSURLRequest *)request
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->loadRequest(request));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadFileURL:(NSURL *)URL allowingReadAccessToURL:(NSURL *)readAccessURL
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (![URL isFileURL])
</span><span class="cx">         [NSException raise:NSInvalidArgumentException format:@"%@ is not a file URL", URL];
</span><span class="cx"> 
</span><span class="lines">@@ -739,7 +734,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadHTMLString:(NSString *)string baseURL:(NSURL *)baseURL
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
</span><span class="cx"> 
</span><span class="cx">     return [self loadData:data MIMEType:@"text/html" characterEncodingName:@"UTF-8" baseURL:baseURL];
</span><span class="lines">@@ -747,13 +741,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->loadData({ static_cast<const uint8_t*>(data.bytes), data.length }, MIMEType, characterEncodingName, baseURL.absoluteString));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)startDownloadUsingRequest:(NSURLRequest *)request completionHandler:(void(^)(WKDownload *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->downloadRequest(request, [completionHandler = makeBlockPtr(completionHandler)] (auto* download) {
</span><span class="cx">         if (download)
</span><span class="cx">             completionHandler(wrapper(download));
</span><span class="lines">@@ -764,7 +756,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)resumeDownloadFromResumeData:(NSData *)resumeData completionHandler:(void(^)(WKDownload *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingFromData:resumeData error:nil]);
</span><span class="cx">     [unarchiver setDecodingFailurePolicy:NSDecodingFailurePolicyRaiseException];
</span><span class="cx">     NSDictionary *dictionary = [unarchiver decodeObjectOfClasses:[NSSet setWithObjects:[NSDictionary class], [NSArray class], [NSString class], [NSNumber class], [NSData class], [NSURL class], [NSURLRequest class], nil] forKey:@"NSKeyedArchiveRootObjectKey"];
</span><span class="lines">@@ -791,7 +782,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goToBackForwardListItem:(WKBackForwardListItem *)item
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->goToBackForwardItem(item._item));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -850,7 +840,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goBack
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (self._safeBrowsingWarning)
</span><span class="cx">         return [self reload];
</span><span class="cx">     return wrapper(_page->goBack());
</span><span class="lines">@@ -858,13 +847,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)goForward
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->goForward());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)reload
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     OptionSet<WebCore::ReloadOption> reloadOptions;
</span><span class="cx">     if (linkedOnOrAfter(WebCore::SDKVersion::FirstWithExpiredOnlyReloadBehavior))
</span><span class="cx">         reloadOptions.add(WebCore::ReloadOption::ExpiredOnly);
</span><span class="lines">@@ -874,31 +861,26 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)reloadFromOrigin
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->reload(WebCore::ReloadOption::FromOrigin));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)stopLoading
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->stopLoading();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(void (^)(id, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:NO withSourceURL:nil withArguments:nil forceUserGesture:YES inFrame:nil inWorld:WKContentWorld.pageWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)evaluateJavaScript:(NSString *)javaScriptString inFrame:(WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(void (^)(id, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:NO withSourceURL:nil withArguments:nil forceUserGesture:YES inFrame:frame inWorld:contentWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)callAsyncJavaScript:(NSString *)javaScriptString arguments:(NSDictionary<NSString *, id> *)arguments inFrame:(WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(void (^)(id, NSError *error))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:YES withSourceURL:nil withArguments:arguments forceUserGesture:YES inFrame:frame inWorld:contentWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -938,7 +920,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)closeAllMediaPresentationsWithCompletionHandler:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto callbackAggregator = CallbackAggregator::create(WTFMove(completionHandler));
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="lines">@@ -955,7 +936,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)pauseAllMediaPlaybackWithCompletionHandler:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!completionHandler) {
</span><span class="cx">         _page->pauseAllMediaPlayback([] { });
</span><span class="cx">         return;
</span><span class="lines">@@ -966,7 +946,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setAllMediaPlaybackSuspended:(BOOL)suspended completionHandler:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!completionHandler)
</span><span class="cx">         completionHandler = [] { };
</span><span class="cx"> 
</span><span class="lines">@@ -997,7 +976,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)requestMediaPlaybackStateWithCompletionHandler:(void (^)(WKMediaPlaybackState))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!completionHandler)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -1028,7 +1006,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setMicrophoneCaptureState:(WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!completionHandler)
</span><span class="cx">         completionHandler = [] { };
</span><span class="cx"> 
</span><span class="lines">@@ -1050,7 +1027,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setCameraCaptureState:(WKMediaCaptureState)state completionHandler:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!completionHandler)
</span><span class="cx">         completionHandler = [] { };
</span><span class="cx"> 
</span><span class="lines">@@ -1072,7 +1048,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_evaluateJavaScript:(NSString *)javaScriptString asAsyncFunction:(BOOL)asAsyncFunction withSourceURL:(NSURL *)sourceURL withArguments:(NSDictionary<NSString *, id> *)arguments forceUserGesture:(BOOL)forceUserGesture inFrame:(WKFrameInfo *)frame inWorld:(WKContentWorld *)world completionHandler:(void (^)(id, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto handler = adoptNS([completionHandler copy]);
</span><span class="cx"> 
</span><span class="cx">     Optional<WebCore::ArgumentWireBytesMap> argumentsMap;
</span><span class="lines">@@ -1134,7 +1109,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void(^)(CocoaImage *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     constexpr bool snapshotFailedTraceValue = false;
</span><span class="cx">     tracePoint(TakeSnapshotStart);
</span><span class="cx"> 
</span><span class="lines">@@ -1208,7 +1182,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setAllowsBackForwardNavigationGestures:(BOOL)allowsBackForwardNavigationGestures
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     _impl->setAllowsBackForwardNavigationGestures(allowsBackForwardNavigationGestures);
</span><span class="cx"> #elif PLATFORM(IOS_FAMILY)
</span><span class="lines">@@ -1247,7 +1220,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setCustomUserAgent:(NSString *)customUserAgent
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setCustomUserAgent(customUserAgent);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1262,7 +1234,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setAllowsLinkPreview:(BOOL)allowsLinkPreview
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     _impl->setAllowsLinkPreview(allowsLinkPreview);
</span><span class="cx">     return;
</span><span class="lines">@@ -1284,7 +1255,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setPageZoom:(CGFloat)pageZoom
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setPageZoomFactor(pageZoom);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1309,7 +1279,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)findString:(NSString *)string withConfiguration:(WKFindConfiguration *)configuration completionHandler:(void (^)(WKFindResult *result))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!string.length) {
</span><span class="cx">         completionHandler(adoptNS([[WKFindResult alloc] _initWithMatchFound:NO]).get());
</span><span class="cx">         return;
</span><span class="lines">@@ -1327,7 +1296,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setMediaType:(NSString *)mediaStyle
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setOverriddenMediaType(mediaStyle);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1343,7 +1311,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setInteractionState:(id)interactionState
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (![(id)interactionState isKindOfClass:[NSData class]])
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -1368,7 +1335,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setAllowsMagnification:(BOOL)allowsMagnification
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _impl->setAllowsMagnification(allowsMagnification);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1379,13 +1345,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setMagnification:(double)magnification centeredAtPoint:(NSPoint)point
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _impl->setMagnification(magnification, NSPointToCGPoint(point));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)setMagnification:(double)magnification
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _impl->setMagnification(magnification);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1396,7 +1360,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (NSPrintOperation *)printOperationWithPrintInfo:(NSPrintInfo *)printInfo
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (auto webFrameProxy = _page->mainFrame())
</span><span class="cx">         return _impl->printOperationWithPrintInfo(printInfo, *webFrameProxy);
</span><span class="cx">     return nil;
</span><span class="lines">@@ -1564,7 +1527,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)createPDFWithConfiguration:(WKPDFConfiguration *)pdfConfiguration completionHandler:(void (^)(NSData *pdfDocumentData, NSError *error))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     WebCore::FrameIdentifier frameID;
</span><span class="cx">     if (auto mainFrame = _page->mainFrame())
</span><span class="cx">         frameID = mainFrame->frameID();
</span><span class="lines">@@ -1590,7 +1552,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)createWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getWebArchiveOfFrame(_page->mainFrame(), [completionHandler = makeBlockPtr(completionHandler)](API::Data* data) {
</span><span class="cx">         completionHandler(wrapper(data), nil);
</span><span class="cx">     });
</span><span class="lines">@@ -1672,7 +1633,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request response:(NSURLResponse *)response responseData:(NSData *)data
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->loadSimulatedRequest(request, response, { static_cast<const uint8_t*>(data.bytes), data.length }));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1679,13 +1639,11 @@
</span><span class="cx"> // FIXME(223658): Remove this once adopters have moved to the final API.
</span><span class="cx"> - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request withResponse:(NSURLResponse *)response responseData:(NSData *)data
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return [self loadSimulatedRequest:request response:response responseData:data];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request responseHTMLString:(NSString *)string
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
</span><span class="cx">     auto response = adoptNS([[NSURLResponse alloc] initWithURL:request.URL MIMEType:@"text/html" expectedContentLength:string.length textEncodingName:@"UTF-8"]);
</span><span class="cx"> 
</span><span class="lines">@@ -1695,13 +1653,11 @@
</span><span class="cx"> // FIXME(223658): Remove this once adopters have moved to the final API.
</span><span class="cx"> - (WKNavigation *)loadSimulatedRequest:(NSURLRequest *)request withResponseHTMLString:(NSString *)string
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return [self loadSimulatedRequest:request responseHTMLString:string];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)loadFileRequest:(NSURLRequest *)request allowingReadAccessToURL:(NSURL *)readAccessURL
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto URL = request.URL;
</span><span class="cx"> 
</span><span class="cx">     if (![URL isFileURL])
</span><span class="lines">@@ -1731,7 +1687,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><del>-#define WEBCORE_PRIVATE_COMMAND(command) - (void)_##command:(id)sender { THROW_IF_SUSPENDED; _page->executeEditCommand(#command ## _s); }
</del><ins>+#define WEBCORE_PRIVATE_COMMAND(command) - (void)_##command:(id)sender { _page->executeEditCommand(#command ## _s); }
</ins><span class="cx"> 
</span><span class="cx"> WEBCORE_PRIVATE_COMMAND(alignCenter)
</span><span class="cx"> WEBCORE_PRIVATE_COMMAND(alignJustified)
</span><span class="lines">@@ -1750,25 +1706,21 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_toggleStrikeThrough:(id)sender
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->executeEditCommand("strikethrough"_s);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_increaseListLevel:(id)sender
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->increaseListLevel();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_decreaseListLevel:(id)sender
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->decreaseListLevel();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_changeListType:(id)sender
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->changeListType();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1820,7 +1772,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setViewportSizeForCSSViewportUnits:(CGSize)viewportSize
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto viewportSizeForViewportUnits = WebCore::IntSize(viewportSize);
</span><span class="cx">     if (viewportSizeForViewportUnits.isEmpty())
</span><span class="cx">         [NSException raise:NSInvalidArgumentException format:@"Viewport size should not be empty"];
</span><span class="lines">@@ -1842,7 +1793,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_didEnableBrowserExtensions:(NSDictionary<NSString *, NSString *> *)extensionIDToNameMap
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     HashMap<String, String> transformed;
</span><span class="cx">     transformed.reserveInitialCapacity(extensionIDToNameMap.count);
</span><span class="cx">     [extensionIDToNameMap enumerateKeysAndObjectsUsingBlock:[&](NSString *extensionID, NSString *extensionName, BOOL *) {
</span><span class="lines">@@ -1853,7 +1803,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_didDisableBrowserExtensions:(NSSet<NSString *> *)extensionIDs
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     HashSet<String> transformed;
</span><span class="cx">     transformed.reserveInitialCapacity(extensionIDs.count);
</span><span class="cx">     for (NSString *extensionID in extensionIDs)
</span><span class="lines">@@ -1902,7 +1851,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setEditable:(BOOL)editable
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     bool wasEditable = _page->isEditable();
</span><span class="cx">     _page->setEditable(editable);
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -1920,7 +1868,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_executeEditCommand:(NSString *)command argument:(NSString *)argument completion:(void (^)(BOOL))completion
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->executeEditCommand(command, argument, [capturedCompletionBlock = makeBlockPtr(completion)] {
</span><span class="cx">         if (capturedCompletionBlock)
</span><span class="cx">             capturedCompletionBlock(YES);
</span><span class="lines">@@ -1956,7 +1903,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_startTextManipulationsWithConfiguration:(_WKTextManipulationConfiguration *)configuration completion:(void(^)())completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     using ExclusionRule = WebCore::TextManipulationController::ExclusionRule;
</span><span class="cx"> 
</span><span class="cx">     if (!_textManipulationDelegate || !_page) {
</span><span class="lines">@@ -2021,7 +1967,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_completeTextManipulation:(_WKTextManipulationItem *)item completion:(void(^)(BOOL success))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!_page) {
</span><span class="cx">         completionHandler(false);
</span><span class="cx">         return;
</span><span class="lines">@@ -2079,7 +2024,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_completeTextManipulationForItems:(NSArray<_WKTextManipulationItem *> *)items completion:(void(^)(NSArray<NSError *> *errors))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!_page) {
</span><span class="cx">         completionHandler(makeFailureSetForAllTextManipulationItems(items).get());
</span><span class="cx">         return;
</span><span class="lines">@@ -2107,7 +2051,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_takeFindStringFromSelection:(id)sender
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     [self _takeFindStringFromSelectionInternal:sender];
</span><span class="cx"> #else
</span><span class="lines">@@ -2162,7 +2105,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_updateMediaPlaybackControlsManager
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
</span><span class="cx">     _impl->updateMediaPlaybackControlsManager();
</span><span class="cx"> #endif
</span><span class="lines">@@ -2188,7 +2130,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_togglePictureInPicture
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if HAVE(TOUCH_BAR) && ENABLE(WEB_PLAYBACK_CONTROLS_MANAGER)
</span><span class="cx">     _impl->togglePictureInPicture();
</span><span class="cx"> #endif
</span><span class="lines">@@ -2201,31 +2142,26 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_closeAllMediaPresentations
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self closeAllMediaPresentationsWithCompletionHandler:nil];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_stopMediaCapture
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->stopMediaCapture(WebCore::MediaProducer::MediaCaptureKind::AudioVideo);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_stopAllMediaPlayback
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self pauseAllMediaPlaybackWithCompletionHandler:nil];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_suspendAllMediaPlayback
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self setAllMediaPlaybackSuspended:YES completionHandler:nil];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_resumeAllMediaPlayback
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self setAllMediaPlaybackSuspended:NO completionHandler:nil];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2242,7 +2178,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_restoreAppHighlights:(NSArray<NSData *> *)highlights
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(APP_HIGHLIGHTS)
</span><span class="cx">     Vector<Ref<WebKit::SharedMemory>> buffers;
</span><span class="cx"> 
</span><span class="lines">@@ -2257,7 +2192,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_restoreAndScrollToAppHighlight:(NSData *)highlight
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(APP_HIGHLIGHTS)
</span><span class="cx">     Vector<Ref<WebKit::SharedMemory>> buffers;
</span><span class="cx">     
</span><span class="lines">@@ -2270,7 +2204,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_addAppHighlight
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(APP_HIGHLIGHTS)
</span><span class="cx">     _page->createAppHighlightInSelectedRange(WebCore::CreateNewGroupForHighlight::No, WebCore::HighlightRequestOriginatedInApp::Yes);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2290,7 +2223,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_loadAlternateHTMLString:(NSString *)string baseURL:(NSURL *)baseURL forUnreachableURL:(NSURL *)unreachableURL
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     NSData *data = [string dataUsingEncoding:NSUTF8StringEncoding];
</span><span class="cx">     _page->loadAlternateHTML({ static_cast<const uint8_t*>(data.bytes), data.length }, "UTF-8"_s, baseURL, unreachableURL);
</span><span class="cx"> }
</span><span class="lines">@@ -2297,13 +2229,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_loadData:(NSData *)data MIMEType:(NSString *)MIMEType characterEncodingName:(NSString *)characterEncodingName baseURL:(NSURL *)baseURL userData:(id)userData
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->loadData({ static_cast<const uint8_t*>(data.bytes), data.length }, MIMEType, characterEncodingName, baseURL.absoluteString, WebKit::ObjCObjectGraph::create(userData).ptr()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLs:(BOOL)shouldOpenExternalURLs
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _WKShouldOpenExternalURLsPolicy policy = shouldOpenExternalURLs ? _WKShouldOpenExternalURLsPolicyAllow : _WKShouldOpenExternalURLsPolicyNotAllow;
</span><span class="cx">     return [self _loadRequest:request shouldOpenExternalURLsPolicy:policy];
</span><span class="cx"> }
</span><span class="lines">@@ -2310,7 +2240,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_loadRequest:(NSURLRequest *)request shouldOpenExternalURLsPolicy:(_WKShouldOpenExternalURLsPolicy)shouldOpenExternalURLsPolicy
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     WebCore::ShouldOpenExternalURLsPolicy policy;
</span><span class="cx">     switch (shouldOpenExternalURLsPolicy) {
</span><span class="cx">     case _WKShouldOpenExternalURLsPolicyNotAllow:
</span><span class="lines">@@ -2328,7 +2257,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_grantAccessToAssetServices
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (_page)
</span><span class="cx">         _page->grantAccessToAssetServices();
</span><span class="cx"> }
</span><span class="lines">@@ -2335,7 +2263,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_revokeAccessToAssetServices
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (_page)
</span><span class="cx">         _page->revokeAccessToAssetServices();
</span><span class="cx"> }
</span><span class="lines">@@ -2342,7 +2269,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_switchFromStaticFontRegistryToUserFontRegistry
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (_page)
</span><span class="cx">         _page->switchFromStaticFontRegistryToUserFontRegistry();
</span><span class="cx"> }
</span><span class="lines">@@ -2349,7 +2275,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_appBoundNavigationDataForDomain:(NSString *)domain completionHandler:(void (^)(NSString * context))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->appBoundNavigationData([registrableDomain = WebCore::RegistrableDomain::uncheckedCreateFromHost(domain), completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
</span><span class="cx">         if (!appBoundData.contextData.contains(registrableDomain)) {
</span><span class="cx">             completionHandler(nil);
</span><span class="lines">@@ -2362,7 +2287,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->appBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
</span><span class="cx">         completionHandler(appBoundData.hasLoadedAppBoundRequestTesting);
</span><span class="cx">     });
</span><span class="lines">@@ -2370,34 +2294,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->appBoundNavigationData([completionHandler = makeBlockPtr(completionHandler)] (auto&& appBoundData) mutable {
</span><span class="cx">         completionHandler(appBoundData.hasLoadedNonAppBoundRequestTesting);
</span><span class="cx">     });
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_suspendPage:(void (^)(BOOL))completionHandler
-{
-    if (!_page) {
-        completionHandler(NO);
-        return;
-    }
-    _page->suspend([completionHandler = makeBlockPtr(completionHandler)](bool success) {
-        completionHandler(success);
-    });
-}
-
-- (void)_resumePage:(void (^)(BOOL))completionHandler
-{
-    if (!_page) {
-        completionHandler(NO);
-        return;
-    }
-    _page->resume([completionHandler = makeBlockPtr(completionHandler)](bool success) {
-        completionHandler(success);
-    });
-}
-
</del><span class="cx"> - (NSArray *)_certificateChain
</span><span class="cx"> {
</span><span class="cx">     if (WebKit::WebFrameProxy* mainFrame = _page->mainFrame())
</span><span class="lines">@@ -2431,7 +2332,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setApplicationNameForUserAgent:(NSString *)applicationNameForUserAgent
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setApplicationNameForUserAgent(applicationNameForUserAgent);
</span><span class="cx">     _page->setApplicationNameForDesktopUserAgent(applicationNameForUserAgent);
</span><span class="cx"> }
</span><span class="lines">@@ -2484,7 +2384,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_killWebContentProcess
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (![self _isValid])
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="lines">@@ -2493,19 +2392,16 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_reloadWithoutContentBlockers
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->reload(WebCore::ReloadOption::DisableContentBlockers));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_reloadExpiredOnly
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->reload(WebCore::ReloadOption::ExpiredOnly));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_killWebContentProcessAndResetState
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     Ref<WebKit::WebProcessProxy> protectedProcessProxy(_page->process());
</span><span class="cx">     protectedProcessProxy->requestTermination(WebKit::ProcessTerminationReason::RequestedByClient);
</span><span class="cx"> 
</span><span class="lines">@@ -2517,7 +2413,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_takePDFSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void (^)(NSData *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     RetainPtr<WKPDFConfiguration> pdfConfiguration;
</span><span class="cx">     if (snapshotConfiguration) {
</span><span class="cx">         pdfConfiguration = adoptNS([[WKPDFConfiguration alloc] init]);
</span><span class="lines">@@ -2529,7 +2424,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getPDFFirstPageSizeInFrame:(_WKFrameHandle *)frame completionHandler:(void(^)(CGSize))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getPDFFirstPageSize(frame->_frameHandle->frameID(), [completionHandler = makeBlockPtr(completionHandler)](WebCore::FloatSize size) {
</span><span class="cx">         completionHandler(static_cast<CGSize>(size));
</span><span class="cx">     });
</span><span class="lines">@@ -2560,7 +2454,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_restoreFromSessionStateData:(NSData *)sessionStateData
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     // FIXME: This should not use the legacy session state decoder.
</span><span class="cx">     WebKit::SessionState sessionState;
</span><span class="cx">     if (!WebKit::decodeLegacySessionState(static_cast<const uint8_t*>(sessionStateData.bytes), sessionStateData.length, sessionState))
</span><span class="lines">@@ -2571,7 +2464,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (WKNavigation *)_restoreSessionState:(_WKSessionState *)sessionState andNavigate:(BOOL)navigate
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return wrapper(_page->restoreFromSessionState(sessionState ? sessionState->_sessionState : WebKit::SessionState { }, navigate));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2582,7 +2474,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)_tryClose
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return _page->tryClose();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2593,7 +2484,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (_WKAttachment *)_insertAttachmentWithFilename:(NSString *)filename contentType:(NSString *)contentType data:(NSData *)data options:(_WKAttachmentDisplayOptions *)options completion:(void(^)(BOOL success))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     UNUSED_PARAM(options);
</span><span class="cx">     auto fileWrapper = adoptNS([[NSFileWrapper alloc] initRegularFileWithContents:data]);
</span><span class="cx">     if (filename)
</span><span class="lines">@@ -2603,7 +2493,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (_WKAttachment *)_insertAttachmentWithFileWrapper:(NSFileWrapper *)fileWrapper contentType:(NSString *)contentType options:(_WKAttachmentDisplayOptions *)options completion:(void(^)(BOOL success))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     UNUSED_PARAM(options);
</span><span class="cx">     return [self _insertAttachmentWithFileWrapper:fileWrapper contentType:contentType completion:completionHandler];
</span><span class="cx"> }
</span><span class="lines">@@ -2610,7 +2499,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (_WKAttachment *)_insertAttachmentWithFileWrapper:(NSFileWrapper *)fileWrapper contentType:(NSString *)contentType completion:(void(^)(BOOL success))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx">     auto identifier = createCanonicalUUIDString();
</span><span class="cx">     auto attachment = API::Attachment::create(identifier, *_page);
</span><span class="lines">@@ -2630,7 +2518,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (_WKAttachment *)_attachmentForIdentifier:(NSString *)identifier
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(ATTACHMENT_ELEMENT)
</span><span class="cx">     if (auto attachment = _page->attachmentForIdentifier(identifier))
</span><span class="cx">         return wrapper(attachment);
</span><span class="lines">@@ -2640,7 +2527,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_simulateDeviceOrientationChangeWithAlpha:(double)alpha beta:(double)beta gamma:(double)gamma
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->simulateDeviceOrientationChange(alpha, beta, gamma);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2656,7 +2542,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_showSafeBrowsingWarningWithTitle:(NSString *)title warning:(NSString *)warning details:(NSAttributedString *)details completionHandler:(void(^)(BOOL))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _showSafeBrowsingWarningWithURL:nil title:title warning:warning detailsWithLinks:details completionHandler:^(BOOL continueUnsafeLoad, NSURL *url) {
</span><span class="cx">         ASSERT(!url);
</span><span class="cx">         completionHandler(continueUnsafeLoad);
</span><span class="lines">@@ -2665,7 +2550,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_showSafeBrowsingWarningWithURL:(NSURL *)url title:(NSString *)title warning:(NSString *)warning details:(NSAttributedString *)details completionHandler:(void(^)(BOOL))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _showSafeBrowsingWarningWithURL:nil title:title warning:warning detailsWithLinks:details completionHandler:^(BOOL continueUnsafeLoad, NSURL *url) {
</span><span class="cx">         ASSERT(!url);
</span><span class="cx">         completionHandler(continueUnsafeLoad);
</span><span class="lines">@@ -2674,7 +2558,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_showSafeBrowsingWarningWithURL:(NSURL *)url title:(NSString *)title warning:(NSString *)warning detailsWithLinks:(NSAttributedString *)details completionHandler:(void(^)(BOOL, NSURL *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     auto safeBrowsingWarning = WebKit::SafeBrowsingWarning::create(url, title, warning, details);
</span><span class="cx">     auto wrapper = [completionHandler = makeBlockPtr(completionHandler)] (Variant<WebKit::ContinueUnsafeLoad, URL>&& variant) {
</span><span class="cx">         switchOn(variant, [&] (WebKit::ContinueUnsafeLoad continueUnsafeLoad) {
</span><span class="lines">@@ -2707,7 +2590,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_isJITEnabled:(void(^)(BOOL))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->isJITEnabled([completionHandler = makeBlockPtr(completionHandler)] (bool enabled) {
</span><span class="cx">         completionHandler(enabled);
</span><span class="cx">     });
</span><span class="lines">@@ -2715,13 +2597,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_evaluateJavaScriptWithoutUserGesture:(NSString *)javaScriptString completionHandler:(void (^)(id, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:NO withSourceURL:nil withArguments:nil forceUserGesture:NO inFrame:nil inWorld:WKContentWorld.pageWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_callAsyncJavaScript:(NSString *)functionBody arguments:(NSDictionary<NSString *, id> *)arguments inFrame:(WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(void (^)(id, NSError *error))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:functionBody asAsyncFunction:YES withSourceURL:nil withArguments:arguments forceUserGesture:YES inFrame:frame inWorld:contentWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2746,13 +2626,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_evaluateJavaScript:(NSString *)javaScriptString inFrame:(WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(void (^)(id, NSError *error))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:NO withSourceURL:nil withArguments:nil forceUserGesture:YES inFrame:frame inWorld:contentWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_evaluateJavaScript:(NSString *)javaScriptString withSourceURL:(NSURL *)url inFrame:(WKFrameInfo *)frame inContentWorld:(WKContentWorld *)contentWorld completionHandler:(void (^)(id, NSError *error))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _evaluateJavaScript:javaScriptString asAsyncFunction:NO withSourceURL:url withArguments:nil forceUserGesture:YES inFrame:frame inWorld:contentWorld completionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2762,7 +2640,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_updateWebpagePreferences:(WKWebpagePreferences *)webpagePreferences
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (webpagePreferences._websiteDataStore)
</span><span class="cx">         [NSException raise:NSInvalidArgumentException format:@"Updating WKWebsiteDataStore is only supported during decidePolicyForNavigationAction."];
</span><span class="cx">     if (webpagePreferences._userContentController)
</span><span class="lines">@@ -2773,13 +2650,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_notifyUserScripts
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->notifyUserScripts();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (BOOL)_deferrableUserScriptsNeedNotification
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     return _page->userScriptsNeedNotification();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2794,7 +2669,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAllowsRemoteInspection:(BOOL)allow
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx">     _page->setAllowsRemoteInspection(allow);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2811,7 +2685,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setRemoteInspectionNameOverride:(NSString *)name
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(REMOTE_INSPECTOR)
</span><span class="cx">     _page->setRemoteInspectionNameOverride(name);
</span><span class="cx"> #endif
</span><span class="lines">@@ -2824,7 +2697,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAddsVisitedLinks:(BOOL)addsVisitedLinks
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setAddsVisitedLinks(addsVisitedLinks);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2872,7 +2744,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getMainResourceDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getMainResourceDataOfFrame(_page->mainFrame(), [completionHandler = makeBlockPtr(completionHandler)](API::Data* data) {
</span><span class="cx">         completionHandler(wrapper(data), nil);
</span><span class="cx">     });
</span><span class="lines">@@ -2880,13 +2751,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getWebArchiveDataWithCompletionHandler:(void (^)(NSData *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self createWebArchiveDataWithCompletionHandler:completionHandler];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_getContentsAsStringWithCompletionHandler:(void (^)(NSString *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getContentsAsString(WebKit::ContentAsStringIncludesChildFrames::No, [handler = makeBlockPtr(completionHandler)](String string) {
</span><span class="cx">         handler(string, nil);
</span><span class="cx">     });
</span><span class="lines">@@ -2894,7 +2763,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getContentsOfAllFramesAsStringWithCompletionHandler:(void (^)(NSString *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getContentsAsString(WebKit::ContentAsStringIncludesChildFrames::Yes, [handler = makeBlockPtr(completionHandler)](String string) {
</span><span class="cx">         handler(string);
</span><span class="cx">     });
</span><span class="lines">@@ -2902,7 +2770,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getContentsAsAttributedStringWithCompletionHandler:(void (^)(NSAttributedString *, NSDictionary<NSAttributedStringDocumentAttributeKey, id> *, NSError *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getContentsAsAttributedString([handler = makeBlockPtr(completionHandler)](auto& attributedString) {
</span><span class="cx">         if (attributedString.string)
</span><span class="cx">             handler(attributedString.string.get(), attributedString.documentAttributes.get(), nil);
</span><span class="lines">@@ -2913,7 +2780,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_getApplicationManifestWithCompletionHandler:(void (^)(_WKApplicationManifest *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(APPLICATION_MANIFEST)
</span><span class="cx">     _page->getApplicationManifest([completionHandler = makeBlockPtr(completionHandler)](const Optional<WebCore::ApplicationManifest>& manifest) {
</span><span class="cx">         if (completionHandler) {
</span><span class="lines">@@ -2951,7 +2817,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPaginationMode:(_WKPaginationMode)paginationMode
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     WebCore::Pagination::Mode mode;
</span><span class="cx">     switch (paginationMode) {
</span><span class="cx">     case _WKPaginationModeUnpaginated:
</span><span class="lines">@@ -2983,7 +2848,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPaginationBehavesLikeColumns:(BOOL)behavesLikeColumns
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setPaginationBehavesLikeColumns(behavesLikeColumns);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2994,7 +2858,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPageLength:(CGFloat)pageLength
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setPageLength(pageLength);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3005,7 +2868,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setGapBetweenPages:(CGFloat)gapBetweenPages
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setGapBetweenPages(gapBetweenPages);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3016,7 +2878,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPaginationLineGridEnabled:(BOOL)lineGridEnabled
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setPaginationLineGridEnabled(lineGridEnabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3037,7 +2898,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setTextZoomFactor:(double)zoomFactor
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setTextZoomFactor(zoomFactor);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3048,7 +2908,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPageZoomFactor:(double)zoomFactor
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self setPageZoom:zoomFactor];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3110,7 +2969,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_countStringMatches:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     if (_customContentView) {
</span><span class="cx">         [_customContentView web_countStringMatches:string options:options maxCount:maxCount];
</span><span class="lines">@@ -3122,7 +2980,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_findString:(NSString *)string options:(_WKFindOptions)options maxCount:(NSUInteger)maxCount
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     // While AppKit contains logic in NSBarTextFinder to automatically update the find pasteboard
</span><span class="cx">     // when the find string changes, this (along with the find pasteboard itself) are both missing
</span><span class="lines">@@ -3139,7 +2996,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_hideFindUI
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     if (_customContentView) {
</span><span class="cx">         [_customContentView web_hideFindUI];
</span><span class="lines">@@ -3151,7 +3007,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_saveBackForwardSnapshotForItem:(WKBackForwardListItem *)item
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (!item)
</span><span class="cx">         return;
</span><span class="cx">     _page->recordNavigationSnapshot(item._item);
</span><span class="lines">@@ -3165,7 +3020,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_clearServiceWorkerEntitlementOverride:(void (^)(void))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->clearServiceWorkerEntitlementOverride([completionHandler = makeBlockPtr(completionHandler)] {
</span><span class="cx">         completionHandler();
</span><span class="cx">     });
</span><span class="lines">@@ -3173,7 +3027,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_preconnectToServer:(NSURL *)url
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->preconnectTo(url);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3184,7 +3037,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setCanUseCredentialStorage:(BOOL)canUseCredentialStorage
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setCanUseCredentialStorage(canUseCredentialStorage);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3325,7 +3177,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setLayoutMode:(_WKLayoutMode)layoutMode
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     WKLayoutMode wkViewLayoutMode;
</span><span class="cx">     switch (layoutMode) {
</span><span class="lines">@@ -3356,13 +3207,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setFixedLayoutSize:(CGSize)fixedLayoutSize
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setFixedLayoutSize(WebCore::expandedIntSize(WebCore::FloatSize(fixedLayoutSize)));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_setBackgroundExtendsBeyondPage:(BOOL)backgroundExtends
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setBackgroundExtendsBeyondPage(backgroundExtends);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3382,7 +3231,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setViewScale:(CGFloat)viewScale
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (viewScale <= 0 || isnan(viewScale) || isinf(viewScale))
</span><span class="cx">         [NSException raise:NSInvalidArgumentException format:@"View scale should be a positive number"];
</span><span class="cx"> 
</span><span class="lines">@@ -3403,13 +3251,11 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setCORSDisablingPatterns:(NSArray<NSString *> *)patterns
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setCORSDisablingPatterns(makeVector<String>(patterns));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_getProcessDisplayNameWithCompletionHandler:(void (^)(NSString *))completionHandler
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->getProcessDisplayName([handler = makeBlockPtr(completionHandler)](auto&& name) {
</span><span class="cx">         handler(name);
</span><span class="cx">     });
</span><span class="lines">@@ -3417,7 +3263,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setMinimumEffectiveDeviceWidth:(CGFloat)minimumEffectiveDeviceWidth
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     if (_page->minimumEffectiveDeviceWidth() == minimumEffectiveDeviceWidth)
</span><span class="cx">         return;
</span><span class="lines">@@ -3440,7 +3285,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_grantAccessToPreferenceService
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     if (_page)
</span><span class="cx">         _page->grantAccessToPreferenceService();
</span><span class="cx"> }
</span><span class="lines">@@ -3449,7 +3293,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setScrollPerformanceDataCollectionEnabled:(BOOL)enabled
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setScrollPerformanceDataCollectionEnabled(enabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3480,7 +3323,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAllowsMediaDocumentInlinePlayback:(BOOL)flag
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if PLATFORM(IOS_FAMILY)
</span><span class="cx">     _page->setAllowsMediaDocumentInlinePlayback(flag);
</span><span class="cx"> #endif
</span><span class="lines">@@ -3519,7 +3361,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setMediaCaptureEnabled:(BOOL)enabled
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     _page->setMediaCaptureEnabled(enabled);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3530,7 +3371,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_setPageMuted:(_WKMediaMutedState)mutedState
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     WebCore::MediaProducer::MutedStateFlags coreState;
</span><span class="cx"> 
</span><span class="cx">     if (mutedState & _WKMediaAudioMuted)
</span><span class="lines">@@ -3545,7 +3385,6 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_removeDataDetectedLinks:(dispatch_block_t)completion
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx"> #if ENABLE(DATA_DETECTION)
</span><span class="cx">     _page->removeDataDetectedLinks([completion = makeBlockPtr(completion), page = makeWeakPtr(_page.get())] (auto& result) {
</span><span class="cx">         if (page)
</span><span class="lines">@@ -3561,13 +3400,11 @@
</span><span class="cx"> // Execute the supplied block after the next transaction from the WebProcess.
</span><span class="cx"> - (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:NO withoutWaitingForAnimatedResize:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_doAfterNextPresentationUpdateWithoutWaitingForPainting:(void (^)(void))updateBlock
</span><span class="cx"> {
</span><del>-    THROW_IF_SUSPENDED;
</del><span class="cx">     [self _internalDoAfterNextPresentationUpdate:updateBlock withoutWaitingForPainting:YES withoutWaitingForAnimatedResize:NO];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h       2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h  2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -410,9 +410,6 @@
</span><span class="cx"> - (void)_didLoadAppBoundRequest:(void (^)(BOOL result))completionHandler;
</span><span class="cx"> - (void)_didLoadNonAppBoundRequest:(void (^)(BOOL result))completionHandler;
</span><span class="cx"> 
</span><del>-- (void)_suspendPage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-- (void)_resumePage:(void (^)(BOOL))completionHandler WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
-
</del><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #if TARGET_OS_IPHONE
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -3146,7 +3146,7 @@
</span><span class="cx">     // If the page is suspended, which should be the case during panning, pinching
</span><span class="cx">     // and animation on the page itself (kinetic scrolling, tap to zoom) etc, then
</span><span class="cx">     // we do not send any of the events to the page even if is has listeners.
</span><del>-    if (!m_areActiveDOMObjectsAndAnimationsSuspended) {
</del><ins>+    if (!m_isPageSuspended) {
</ins><span class="cx">         m_touchEventQueue.append(event);
</span><span class="cx">         m_process->startResponsivenessTimer();
</span><span class="cx">         send(Messages::WebPage::TouchEvent(event));
</span><span class="lines">@@ -3594,10 +3594,10 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::resumeActiveDOMObjectsAndAnimations()
</span><span class="cx"> {
</span><del>-    if (!hasRunningProcess() || !m_areActiveDOMObjectsAndAnimationsSuspended)
</del><ins>+    if (!hasRunningProcess() || !m_isPageSuspended)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_areActiveDOMObjectsAndAnimationsSuspended = false;
</del><ins>+    m_isPageSuspended = false;
</ins><span class="cx"> 
</span><span class="cx">     send(Messages::WebPage::ResumeActiveDOMObjectsAndAnimations());
</span><span class="cx"> }
</span><span class="lines">@@ -3604,35 +3604,14 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::suspendActiveDOMObjectsAndAnimations()
</span><span class="cx"> {
</span><del>-    if (!hasRunningProcess() || m_areActiveDOMObjectsAndAnimationsSuspended)
</del><ins>+    if (!hasRunningProcess() || m_isPageSuspended)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_areActiveDOMObjectsAndAnimationsSuspended = true;
</del><ins>+    m_isPageSuspended = true;
</ins><span class="cx"> 
</span><span class="cx">     send(Messages::WebPage::SuspendActiveDOMObjectsAndAnimations());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::suspend(CompletionHandler<void(bool)>&& completionHandler)
-{
-    RELEASE_LOG_IF_ALLOWED(Loading, "suspend:");
-    if (!hasRunningProcess() || m_isSuspended)
-        return completionHandler(false);
-
-    m_isSuspended = true;
-    sendWithAsyncReply(Messages::WebPage::Suspend(), WTFMove(completionHandler));
-}
-
-void WebPageProxy::resume(CompletionHandler<void(bool)>&& completionHandler)
-{
-    RELEASE_LOG_IF_ALLOWED(Loading, "resume:");
-
-    if (!hasRunningProcess() || !m_isSuspended)
-        return completionHandler(false);
-
-    m_isSuspended = false;
-    sendWithAsyncReply(Messages::WebPage::Resume(), WTFMove(completionHandler));
-}
-
</del><span class="cx"> bool WebPageProxy::supportsTextEncoding() const
</span><span class="cx"> {
</span><span class="cx">     // FIXME (118840): We should probably only support this for text documents, not all non-image documents.
</span><span class="lines">@@ -6102,7 +6081,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::requestMediaPlaybackState(CompletionHandler<void(MediaPlaybackState)>&& completionHandler)
</del><ins>+void WebPageProxy::requestMediaPlaybackState(CompletionHandler<void(WebKit::MediaPlaybackState)>&& completionHandler)
</ins><span class="cx"> {
</span><span class="cx">     if (!hasRunningProcess()) {
</span><span class="cx">         completionHandler({ });
</span><span class="lines">@@ -7743,7 +7722,7 @@
</span><span class="cx">     m_visiblePageToken = nullptr;
</span><span class="cx"> 
</span><span class="cx">     m_hasRunningProcess = false;
</span><del>-    m_areActiveDOMObjectsAndAnimationsSuspended = false;
</del><ins>+    m_isPageSuspended = false;
</ins><span class="cx"> 
</span><span class="cx">     m_userScriptsNotified = false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.h     2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h        2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -505,10 +505,6 @@
</span><span class="cx">     void didEnterFullscreen();
</span><span class="cx">     void didExitFullscreen();
</span><span class="cx"> 
</span><del>-    void suspend(CompletionHandler<void(bool)>&&);
-    void resume(CompletionHandler<void(bool)>&&);
-    bool isSuspended() const { return m_isSuspended; }
-
</del><span class="cx">     WebInspectorUIProxy* inspector() const;
</span><span class="cx">     GeolocationPermissionRequestManagerProxy& geolocationPermissionRequestManager() { return m_geolocationPermissionRequestManager; }
</span><span class="cx"> 
</span><span class="lines">@@ -1018,7 +1014,7 @@
</span><span class="cx">     void setCustomTextEncodingName(const String&);
</span><span class="cx">     String customTextEncodingName() const { return m_customTextEncodingName; }
</span><span class="cx"> 
</span><del>-    bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_areActiveDOMObjectsAndAnimationsSuspended; }
</del><ins>+    bool areActiveDOMObjectsAndAnimationsSuspended() const { return m_isPageSuspended; }
</ins><span class="cx">     void resumeActiveDOMObjectsAndAnimations();
</span><span class="cx">     void suspendActiveDOMObjectsAndAnimations();
</span><span class="cx"> 
</span><span class="lines">@@ -2757,7 +2753,7 @@
</span><span class="cx">     RefPtr<WebCore::ValidationBubble> m_validationBubble;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    bool m_areActiveDOMObjectsAndAnimationsSuspended { false };
</del><ins>+    bool m_isPageSuspended { false };
</ins><span class="cx">     bool m_addsVisitedLinks { true };
</span><span class="cx"> 
</span><span class="cx">     bool m_controlledByAutomation { false };
</span><span class="lines">@@ -3019,7 +3015,6 @@
</span><span class="cx"> 
</span><span class="cx">     bool m_lastNavigationWasAppBound { false };
</span><span class="cx">     bool m_isRunningModalJavaScriptDialog { false };
</span><del>-    bool m_isSuspended { false };
</del><span class="cx"> 
</span><span class="cx">     Optional<WebCore::PrivateClickMeasurement> m_privateClickMeasurement;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp       2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp  2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -152,7 +152,6 @@
</span><span class="cx"> #include <WebCore/ArchiveResource.h>
</span><span class="cx"> #include <WebCore/BackForwardCache.h>
</span><span class="cx"> #include <WebCore/BackForwardController.h>
</span><del>-#include <WebCore/CachedPage.h>
</del><span class="cx"> #include <WebCore/Chrome.h>
</span><span class="cx"> #include <WebCore/CommonVM.h>
</span><span class="cx"> #include <WebCore/ContactsRequestData.h>
</span><span class="lines">@@ -3597,37 +3596,6 @@
</span><span class="cx">     m_page->resumeActiveDOMObjectsAndAnimations();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::suspend(CompletionHandler<void(bool)>&& completionHandler)
-{
-    RELEASE_LOG_IF_ALLOWED(Loading, "suspend: m_page=%p", m_page.get());
-    if (!m_page)
-        return completionHandler(false);
-
-    freezeLayerTree(LayerTreeFreezeReason::PageSuspended);
-
-    m_cachedPage = BackForwardCache::singleton().suspendPage(*m_page);
-    ASSERT(m_cachedPage);
-    if (auto mainFrame = m_mainFrame->coreFrame())
-        mainFrame->loader().detachFromAllOpenedFrames();
-    completionHandler(true);
-}
-
-void WebPage::resume(CompletionHandler<void(bool)>&& completionHandler)
-{
-    RELEASE_LOG_IF_ALLOWED(Loading, "resume: m_page=%p", m_page.get());
-    if (!m_page)
-        return completionHandler(false);
-
-    auto cachedPage = std::exchange(m_cachedPage, nullptr);
-    ASSERT(cachedPage);
-    if (!cachedPage)
-        return completionHandler(false);
-
-    cachedPage->restore(*m_page);
-    unfreezeLayerTree(LayerTreeFreezeReason::PageSuspended);
-    completionHandler(true);
-}
-
</del><span class="cx"> IntPoint WebPage::screenToRootView(const IntPoint& point)
</span><span class="cx"> {
</span><span class="cx">     IntPoint windowPoint;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h    2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -177,7 +177,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-class CachedPage;
</del><span class="cx"> class CaptureDevice;
</span><span class="cx"> class DocumentLoader;
</span><span class="cx"> class DragData;
</span><span class="lines">@@ -1670,9 +1669,6 @@
</span><span class="cx">     void suspendActiveDOMObjectsAndAnimations();
</span><span class="cx">     void resumeActiveDOMObjectsAndAnimations();
</span><span class="cx"> 
</span><del>-    void suspend(CompletionHandler<void(bool)>&&);
-    void resume(CompletionHandler<void(bool)>&&);
-
</del><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     void performDictionaryLookupAtLocation(const WebCore::FloatPoint&);
</span><span class="cx">     void performDictionaryLookupOfCurrentSelection();
</span><span class="lines">@@ -2322,8 +2318,6 @@
</span><span class="cx"> 
</span><span class="cx">     Vector<String> m_corsDisablingPatterns;
</span><span class="cx"> 
</span><del>-    std::unique_ptr<WebCore::CachedPage> m_cachedPage;
-
</del><span class="cx"> #if ENABLE(IPC_TESTING_API)
</span><span class="cx">     bool m_ipcTestingAPIEnabled { false };
</span><span class="cx">     uint64_t m_visitedLinkTableID;
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in       2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in  2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -250,9 +250,6 @@
</span><span class="cx">     SuspendActiveDOMObjectsAndAnimations()
</span><span class="cx">     ResumeActiveDOMObjectsAndAnimations()
</span><span class="cx"> 
</span><del>-    Suspend() -> (bool success) Async
-    Resume() -> (bool success) Async
-
</del><span class="cx">     Close()
</span><span class="cx">     TryClose() -> (bool shouldClose) Async
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Tools/ChangeLog       2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-05-11  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, reverting r277341.
+        https://bugs.webkit.org/show_bug.cgi?id=225685
+
+        Caused WK2 layout tests to exit with an exception
+
+        Reverted changeset:
+
+        "Add SPI to suspend / resume a WKWebView"
+        https://bugs.webkit.org/show_bug.cgi?id=225333
+        https://trac.webkit.org/changeset/277341
+
</ins><span class="cx"> 2021-05-11  Wenson Hsieh  <wenson_hsieh@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [iOS] Mail compose web view doesn't scroll to reveal the selection in certain configurations
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestWebKitAPIxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj        2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj   2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -262,7 +262,6 @@
</span><span class="cx">          463F4723255B49B600D9E0CC /* VisibilityState.mm in Sources */ = {isa = PBXBuildFile; fileRef = 463F4722255B49B600D9E0CC /* VisibilityState.mm */; };
</span><span class="cx">          4647B1261EBA3B850041D7EF /* ProcessDidTerminate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4647B1251EBA3B730041D7EF /* ProcessDidTerminate.cpp */; };
</span><span class="cx">          464C764D230DF85C00AFB020 /* BadServiceWorkerRegistrations-4.sqlite3 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 464C764C230DF83200AFB020 /* BadServiceWorkerRegistrations-4.sqlite3 */; };
</span><del>-               465C23AF2640C3FE00F2FC7F /* postMessage-regularly.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 465C23AE2640C3C500F2FC7F /* postMessage-regularly.html */; };
</del><span class="cx">           465E2807255B2A6A0063A787 /* GPUProcess.mm in Sources */ = {isa = PBXBuildFile; fileRef = 465E2806255B2A690063A787 /* GPUProcess.mm */; };
</span><span class="cx">          466C3843210637DE006A88DE /* notify-resourceLoadObserver.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 466C3842210637CE006A88DE /* notify-resourceLoadObserver.html */; };
</span><span class="cx">          467C565321B5ED130057516D /* GetSessionCookie.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 467C565121B5ECDF0057516D /* GetSessionCookie.html */; };
</span><span class="lines">@@ -1651,7 +1650,6 @@
</span><span class="cx">                          3FCC4FE81EC4E8CA0076E37C /* PictureInPictureDelegate.html in Copy Resources */,
</span><span class="cx">                          F415086D1DA040C50044BE9B /* play-audio-on-click.html in Copy Resources */,
</span><span class="cx">                          0EBBCC661FFF9E0C00FA42AB /* pop-up-check.html in Copy Resources */,
</span><del>-                               465C23AF2640C3FE00F2FC7F /* postMessage-regularly.html in Copy Resources */,
</del><span class="cx">                           F41AB9A81EF4696B0083FA08 /* prevent-operation.html in Copy Resources */,
</span><span class="cx">                          F41AB9A91EF4696B0083FA08 /* prevent-start.html in Copy Resources */,
</span><span class="cx">                          F6FDDDD614241C6F004F1729 /* push-state.html in Copy Resources */,
</span><span class="lines">@@ -2069,7 +2067,6 @@
</span><span class="cx">          463F4722255B49B600D9E0CC /* VisibilityState.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VisibilityState.mm; sourceTree = "<group>"; };
</span><span class="cx">          4647B1251EBA3B730041D7EF /* ProcessDidTerminate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProcessDidTerminate.cpp; sourceTree = "<group>"; };
</span><span class="cx">          464C764C230DF83200AFB020 /* BadServiceWorkerRegistrations-4.sqlite3 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "BadServiceWorkerRegistrations-4.sqlite3"; sourceTree = "<group>"; };
</span><del>-               465C23AE2640C3C500F2FC7F /* postMessage-regularly.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "postMessage-regularly.html"; sourceTree = "<group>"; };
</del><span class="cx">           465E2806255B2A690063A787 /* GPUProcess.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = GPUProcess.mm; sourceTree = "<group>"; };
</span><span class="cx">          466C3842210637CE006A88DE /* notify-resourceLoadObserver.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "notify-resourceLoadObserver.html"; sourceTree = "<group>"; };
</span><span class="cx">          467C565121B5ECDF0057516D /* GetSessionCookie.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = GetSessionCookie.html; sourceTree = "<group>"; };
</span><span class="lines">@@ -4076,7 +4073,6 @@
</span><span class="cx">                          9B7D740E1F8377E60006C432 /* paste-rtfd.html */,
</span><span class="cx">                          3FCC4FE61EC4E87E0076E37C /* PictureInPictureDelegate.html */,
</span><span class="cx">                          F415086C1DA040C10044BE9B /* play-audio-on-click.html */,
</span><del>-                               465C23AE2640C3C500F2FC7F /* postMessage-regularly.html */,
</del><span class="cx">                           F41AB9941EF4692C0083FA08 /* prevent-operation.html */,
</span><span class="cx">                          F41AB99A1EF4692C0083FA08 /* prevent-start.html */,
</span><span class="cx">                          A12DDBFF1E8373C100CF6CAE /* rendered-image-excluding-overflow.html */,
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoaProcessSuspensionmm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm 2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSuspension.mm    2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -26,13 +26,11 @@
</span><span class="cx"> #import "config.h"
</span><span class="cx"> 
</span><span class="cx"> #import "PlatformUtilities.h"
</span><del>-#import "TestNavigationDelegate.h"
</del><span class="cx"> #import "TestWKWebView.h"
</span><span class="cx"> #import <WebKit/WKWebViewConfiguration.h>
</span><span class="cx"> #import <WebKit/WKWebViewConfigurationPrivate.h>
</span><span class="cx"> #import <WebKit/WKWebViewPrivate.h>
</span><span class="cx"> #import <WebKit/WKWebViewPrivateForTesting.h>
</span><del>-#import <wtf/Function.h>
</del><span class="cx"> 
</span><span class="cx"> TEST(ProcessSuspension, CancelWebProcessSuspension)
</span><span class="cx"> {
</span><span class="lines">@@ -85,151 +83,3 @@
</span><span class="cx">     TestWebKitAPI::Util::sleep(1);
</span><span class="cx">     EXPECT_EQ(pid1, [webView3 _webProcessIdentifier]);
</span><span class="cx"> }
</span><del>-
-TEST(ProcessSuspension, WKWebViewSuspendPage)
-{
-    auto configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
-
-    auto testMessageHandler = adoptNS([[TestMessageHandler alloc] init]);
-    [[configuration userContentController] addScriptMessageHandler:testMessageHandler.get() name:@"testHandler"];
-    __block unsigned timerFiredCount = 0;
-    [testMessageHandler addMessage:@"timer fired" withHandler:^{
-        ++timerFiredCount;
-    }];
-
-    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:CGRectMake(0, 0, 800, 600) configuration:configuration.get() addToWindow:YES]);
-    [webView synchronouslyLoadTestPageNamed:@"postMessage-regularly"];
-
-    auto pid = [webView _webProcessIdentifier];
-    EXPECT_NE(pid, 0);
-
-    // The timer should be firing.
-    auto lastTimerFireCount = timerFiredCount;
-    while (lastTimerFireCount == timerFiredCount)
-        TestWebKitAPI::Util::spinRunLoop(10);
-    EXPECT_TRUE(timerFiredCount > lastTimerFireCount);
-
-    auto testRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://webkit.org/"]];
-    id testInteractionState = [webView interactionState];
-    auto originalURL = [webView URL];
-
-    // Suspend the page.
-    [webView removeFromSuperview];
-    __block bool done = false;
-    [webView _suspendPage:^(BOOL success) {
-        EXPECT_TRUE(success);
-        done = true;
-    }];
-    TestWebKitAPI::Util::run(&done);
-
-    // The timer should no longer be firing.
-    lastTimerFireCount = timerFiredCount;
-    TestWebKitAPI::Util::spinRunLoop(100);
-    EXPECT_EQ(lastTimerFireCount, timerFiredCount);
-
-    auto checkThrows = [](Function<void()>&& f) {
-        @try {
-            f();
-        } @catch (NSException *e) {
-            return true;
-        }
-        return false;
-    };
-
-    // Most operations on WKWebView should throw an exception when suspended.
-    EXPECT_TRUE(checkThrows([&] { [webView evaluateJavaScript:@"window.name" completionHandler:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView synchronouslyLoadTestPageNamed:@"simple2"]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView loadHTMLString:@"foo" baseURL:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView goToBackForwardListItem:webView.get().backForwardList.currentItem]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView reload]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView reloadFromOrigin]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView goBack]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView goForward]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView stopLoading]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView closeAllMediaPresentationsWithCompletionHandler:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView pauseAllMediaPlaybackWithCompletionHandler:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView setAllMediaPlaybackSuspended:YES completionHandler:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView requestMediaPlaybackStateWithCompletionHandler:^(WKMediaPlaybackState) { }]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView setCameraCaptureState:WKMediaCaptureStateActive completionHandler:nil]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView setMicrophoneCaptureState:WKMediaCaptureStateActive completionHandler:nil]; }));
-#if TARGET_OS_IPHONE
-    EXPECT_TRUE(checkThrows([&] { [webView takeSnapshotWithConfiguration:nil completionHandler:^(UIImage *snapshot, NSError *error) { }]; }));
-#else
-    EXPECT_TRUE(checkThrows([&] { [webView takeSnapshotWithConfiguration:nil completionHandler:^(NSImage *snapshot, NSError *error) { }]; }));
-#endif
-    EXPECT_TRUE(checkThrows([&] { [webView createPDFWithConfiguration:nil completionHandler:^(NSData *data, NSError *error) { }]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView createWebArchiveDataWithCompletionHandler:^(NSData *data, NSError *error) { }]; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().allowsBackForwardNavigationGestures = YES; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().customUserAgent = @"foo"; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().allowsLinkPreview = YES; }));
-#if !TARGET_OS_IPHONE
-    EXPECT_TRUE(checkThrows([&] { webView.get().allowsMagnification = YES; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().magnification = 1.1; }));
-    EXPECT_TRUE(checkThrows([&] { [webView setMagnification:1.1 centeredAtPoint:CGPointMake(0, 0)]; }));
-#endif
-    EXPECT_TRUE(checkThrows([&] { webView.get().pageZoom = 1.1; }));
-    EXPECT_TRUE(checkThrows([&] { [webView findString:@"foo" withConfiguration:nil completionHandler:^(WKFindResult *result) { }]; }));
-    EXPECT_TRUE(checkThrows([&] { [webView startDownloadUsingRequest:testRequest completionHandler:^(WKDownload *download) { }]; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().interactionState = testInteractionState; }));
-    EXPECT_TRUE(checkThrows([&] { webView.get().mediaType = @"text/html"; }));
-
-    // Some of the basic API still works.
-    EXPECT_WK_STREQ([webView URL].absoluteString, originalURL.absoluteString);
-    EXPECT_EQ([webView backForwardList].backItem, nil);
-    EXPECT_WK_STREQ([webView title], @"");
-    EXPECT_FALSE([webView isLoading]);
-    EXPECT_EQ([webView estimatedProgress], 1.0);
-    EXPECT_FALSE([webView canGoBack]);
-    EXPECT_FALSE([webView canGoForward]);
-    EXPECT_FALSE([webView hasOnlySecureContent]);
-    EXPECT_EQ([webView serverTrust], nil);
-    EXPECT_EQ([webView cameraCaptureState], WKMediaCaptureStateNone);
-    EXPECT_EQ([webView microphoneCaptureState], WKMediaCaptureStateNone);
-    EXPECT_WK_STREQ([webView customUserAgent], @"");
-    EXPECT_TRUE([webView allowsLinkPreview]);
-#if !TARGET_OS_IPHONE
-    EXPECT_FALSE([webView allowsMagnification]);
-    EXPECT_EQ([webView magnification], 1.0);
-#endif
-    EXPECT_EQ([webView pageZoom], 1.0);
-    EXPECT_WK_STREQ([webView mediaType], @"");
-    EXPECT_FALSE(checkThrows([&] { [webView interactionState]; }));
-    EXPECT_FALSE(checkThrows([&] { [webView themeColor]; }));
-
-    // Resume the page.
-    done = false;
-    [webView _resumePage:^(BOOL success) {
-        EXPECT_TRUE(success);
-        done = true;
-    }];
-    TestWebKitAPI::Util::run(&done);
-    [webView addToTestWindow];
-
-    // The timer should start firing again.
-    lastTimerFireCount = timerFiredCount;
-    while (lastTimerFireCount == timerFiredCount)
-        TestWebKitAPI::Util::spinRunLoop(10);
-    EXPECT_TRUE(timerFiredCount > lastTimerFireCount);
-
-    // Make sure we did not crash.
-    EXPECT_EQ(pid, [webView _webProcessIdentifier]);
-}
-
-TEST(ProcessSuspension, DeallocateSuspendedView)
-{
-    // Deallocating a suspended WebView should not throw or crash.
-    @autoreleasepool {
-        auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600)]);
-        [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"simple" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
-        [webView _test_waitForDidFinishNavigation];
-
-        __block bool done = false;
-        [webView _suspendPage:^(BOOL success) {
-            EXPECT_TRUE(success);
-            done = true;
-        }];
-        TestWebKitAPI::Util::run(&done);
-
-        [webView _close];
-    }
-}
</del></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitCocoapostMessageregularlyhtml"></a>
<div class="delfile"><h4>Deleted: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html (277352 => 277353)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html   2021-05-12 03:46:21 UTC (rev 277352)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/postMessage-regularly.html      2021-05-12 03:49:57 UTC (rev 277353)
</span><span class="lines">@@ -1,10 +0,0 @@
</span><del>-<!DOCTYPE>
-<html>
-<body>
-<script>
-setInterval(() => {
-    webkit.messageHandlers.testHandler.postMessage('timer fired');
-}, 5);
-</script>
-</body>
-</html>
</del></span></pre>
</div>
</div>

</body>
</html>