<!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>[286815] trunk/Source</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/286815">286815</a></dd>
<dt>Author</dt> <dd>achristensen@apple.com</dd>
<dt>Date</dt> <dd>2021-12-09 16:23:53 -0800 (Thu, 09 Dec 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Use Span for IPC::ArrayReference and DataReference
https://bugs.webkit.org/show_bug.cgi?id=233931

Reviewed by Wenson Hsieh.

Source/WebKit:

No change in behavior, just simplifying some code.

* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/ArrayReference.h:
(): Deleted.
(IPC::ArrayReference::ArrayReference): Deleted.
(IPC::ArrayReference::isEmpty const): Deleted.
(IPC::ArrayReference::size const): Deleted.
(IPC::ArrayReference::data const): Deleted.
(IPC::ArrayReference::vector const): Deleted.
* Platform/IPC/DataReference.h:
* Platform/IPC/SharedBufferDataReference.cpp:
(IPC::SharedBufferDataReference::encode const):
* Shared/API/APIData.cpp:
(API::Data::create):
* Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtension::Handle::decode):
* Shared/UserData.cpp:
(WebKit::UserData::decode):
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::ArgumentCoder<RetainPtr<CFURLRef>>::decode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView createPDFWithConfiguration:completionHandler:]):
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::createData):
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadSimulatedRequest):
(WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):
(WebKit::WebPageProxy::wrapCryptoKey):
(WebKit::WebPageProxy::unwrapCryptoKey):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _wk_pageCountForPrintFormatter:]):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):
* WebProcess/Network/WebSocketChannel.cpp:
(WebKit::WebSocketChannel::didReceiveBinaryData):
* WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:
(WebKit::RTCDataChannelRemoteManager::receiveData):
* WebProcess/UserContent/WebUserContentController.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::replaceSelectionWithPasteboardData):

Source/WTF:

* wtf/Vector.h:
(WTF::Vector::Vector):
(WTF::Vector::span const):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfVectorh">trunk/Source/WTF/wtf/Vector.h</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitPlatformIPCArgumentCodersh">trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h</a></li>
<li><a href="#trunkSourceWebKitPlatformIPCArrayReferenceh">trunk/Source/WebKit/Platform/IPC/ArrayReference.h</a></li>
<li><a href="#trunkSourceWebKitPlatformIPCDataReferenceh">trunk/Source/WebKit/Platform/IPC/DataReference.h</a></li>
<li><a href="#trunkSourceWebKitPlatformIPCSharedBufferDataReferencecpp">trunk/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedAPIAPIDatacpp">trunk/Source/WebKit/Shared/API/APIData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedCocoaSandboxExtensionCocoamm">trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm</a></li>
<li><a href="#trunkSourceWebKitSharedUserDatacpp">trunk/Source/WebKit/Shared/UserData.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedcfArgumentCodersCFcpp">trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessDownloadsDownloadProxycpp">trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessProvisionalPageProxycpp">trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessUserContentWebUserContentControllerProxycpp">trunk/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebPageProxycpp">trunk/Source/WebKit/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessiosWKContentViewmm">trunk/Source/WebKit/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKitUIProcessmacWebPageProxyMacmm">trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm</a></li>
<li><a href="#trunkSourceWebKitWebProcessGPUgraphicsRemoteGraphicsContextGLProxyFunctionsGeneratedcpp">trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessNetworkWebSocketChannelcpp">trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessNetworkwebrtcRTCDataChannelRemoteManagercpp">trunk/Source/WebKit/WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessUserContentWebUserContentControllercpp">trunk/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPageWebPagecpp">trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessWebPagemacWebPageMacmm">trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WTF/ChangeLog  2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2021-12-09  Alex Christensen  <achristensen@webkit.org>
+
+        Use Span for IPC::ArrayReference and DataReference
+        https://bugs.webkit.org/show_bug.cgi?id=233931
+
+        Reviewed by Wenson Hsieh.
+
+        * wtf/Vector.h:
+        (WTF::Vector::Vector):
+        (WTF::Vector::span const):
+
</ins><span class="cx"> 2021-12-09  Robert Jenner  <Jenner@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, reverting r286754.
</span></span></pre></div>
<a id="trunkSourceWTFwtfVectorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/Vector.h (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/Vector.h    2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WTF/wtf/Vector.h       2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -654,6 +654,9 @@
</span><span class="cx">             TypeOperations::uninitializedCopy(data, data + dataSize, begin());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    Vector(Span<const T> span)
+        : Vector(span.data(), span.size()) { }
+
</ins><span class="cx">     Vector(std::initializer_list<T> initializerList)
</span><span class="cx">     {
</span><span class="cx">         reserveInitialCapacity(initializerList.size());
</span><span class="lines">@@ -707,6 +710,7 @@
</span><span class="cx">     static ptrdiff_t sizeMemoryOffset() { return OBJECT_OFFSETOF(Vector, m_size); }
</span><span class="cx">     size_t capacity() const { return Base::capacity(); }
</span><span class="cx">     bool isEmpty() const { return !size(); }
</span><ins>+    Span<const T> span() const { return { data(), size() }; }
</ins><span class="cx"> 
</span><span class="cx">     T& at(size_t i)
</span><span class="cx">     {
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/ChangeLog       2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -1,3 +1,59 @@
</span><ins>+2021-12-09  Alex Christensen  <achristensen@webkit.org>
+
+        Use Span for IPC::ArrayReference and DataReference
+        https://bugs.webkit.org/show_bug.cgi?id=233931
+
+        Reviewed by Wenson Hsieh.
+
+        No change in behavior, just simplifying some code.
+
+        * Platform/IPC/ArgumentCoders.h:
+        * Platform/IPC/ArrayReference.h:
+        (): Deleted.
+        (IPC::ArrayReference::ArrayReference): Deleted.
+        (IPC::ArrayReference::isEmpty const): Deleted.
+        (IPC::ArrayReference::size const): Deleted.
+        (IPC::ArrayReference::data const): Deleted.
+        (IPC::ArrayReference::vector const): Deleted.
+        * Platform/IPC/DataReference.h:
+        * Platform/IPC/SharedBufferDataReference.cpp:
+        (IPC::SharedBufferDataReference::encode const):
+        * Shared/API/APIData.cpp:
+        (API::Data::create):
+        * Shared/Cocoa/SandboxExtensionCocoa.mm:
+        (WebKit::SandboxExtension::Handle::decode):
+        * Shared/UserData.cpp:
+        (WebKit::UserData::decode):
+        * Shared/cf/ArgumentCodersCF.cpp:
+        (IPC::ArgumentCoder<RetainPtr<CFURLRef>>::decode):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView createPDFWithConfiguration:completionHandler:]):
+        * UIProcess/Downloads/DownloadProxy.cpp:
+        (WebKit::createData):
+        * UIProcess/ProvisionalPageProxy.cpp:
+        (WebKit::ProvisionalPageProxy::registerWebProcessAccessibilityToken):
+        * UIProcess/UserContent/WebUserContentControllerProxy.cpp:
+        (WebKit::WebUserContentControllerProxy::didPostMessage):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::loadData):
+        (WebKit::WebPageProxy::loadSimulatedRequest):
+        (WebKit::WebPageProxy::runJavaScriptInFrameInScriptWorld):
+        (WebKit::WebPageProxy::wrapCryptoKey):
+        (WebKit::WebPageProxy::unwrapCryptoKey):
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView _wk_pageCountForPrintFormatter:]):
+        * UIProcess/mac/WebPageProxyMac.mm:
+        (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication):
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
+        (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat):
+        * WebProcess/Network/WebSocketChannel.cpp:
+        (WebKit::WebSocketChannel::didReceiveBinaryData):
+        * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:
+        (WebKit::RTCDataChannelRemoteManager::receiveData):
+        * WebProcess/UserContent/WebUserContentController.cpp:
+        * WebProcess/WebPage/mac/WebPageMac.mm:
+        (WebKit::WebPage::replaceSelectionWithPasteboardData):
+
</ins><span class="cx"> 2021-12-09  Robert Jenner  <Jenner@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, reverting r286754.
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformIPCArgumentCodersh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h        2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Platform/IPC/ArgumentCoders.h   2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -57,46 +57,28 @@
</span><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template<typename T, size_t Extent> struct ArgumentCoder<ArrayReference<T, Extent>> {
-    using ArrayReferenceType = ArrayReference<T, Extent>;
</del><ins>+template<typename T, size_t Extent> struct ArgumentCoder<Span<T, Extent>> {
</ins><span class="cx">     template<typename Encoder>
</span><del>-    static void encode(Encoder& encoder, const ArrayReferenceType& arrayReference)
</del><ins>+    static void encode(Encoder& encoder, const Span<T, Extent>& span)
</ins><span class="cx">     {
</span><del>-        if (!Extent)
-            return;
-        encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(arrayReference.data()), arrayReference.size() * sizeof(T), alignof(T));
</del><ins>+        if constexpr (Extent == WTF::dynamic_extent)
+            encoder << static_cast<uint64_t>(span.size());
+        encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(span.data()), span.size() * sizeof(T), alignof(T));
</ins><span class="cx">     }
</span><span class="cx">     template<typename Decoder>
</span><del>-    static std::optional<ArrayReferenceType> decode(Decoder& decoder)
</del><ins>+    static std::optional<Span<T, Extent>> decode(Decoder& decoder)
</ins><span class="cx">     {
</span><del>-        if (!Extent)
-            return ArrayReferenceType();
-        const uint8_t* data = decoder.decodeFixedLengthReference(Extent * sizeof(T), alignof(T));
-        if (!data)
-            return std::nullopt;
-        return ArrayReferenceType(reinterpret_cast<const T*>(data), Extent);
-    }
-};
-
-template<typename T> struct ArgumentCoder<ArrayReference<T, arrayReferenceDynamicExtent>> {
-    using ArrayReferenceType = ArrayReference<T, arrayReferenceDynamicExtent>;
-    template<typename Encoder>
-    static void encode(Encoder& encoder, const ArrayReferenceType& arrayReference)
-    {
-        encoder << static_cast<uint64_t>(arrayReference.size());
-        if (!arrayReference.size())
-            return;
-        encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(arrayReference.data()), arrayReference.size() * sizeof(T), alignof(T));
-    }
-    template<typename Decoder>
-    static std::optional<ArrayReferenceType> decode(Decoder& decoder)
-    {
</del><span class="cx">         std::optional<uint64_t> size;
</span><del>-        decoder >> size;
-        if (!size)
-            return std::nullopt;
-        if (!*size)
-            return ArrayReferenceType();
</del><ins>+        if constexpr (Extent == WTF::dynamic_extent) {
+            decoder >> size;
+            if (!size)
+                return std::nullopt;
+            if (!*size)
+                return Span<T, Extent>();
+        } else {
+            size = Extent;
+            static_assert(Extent, "Can't decode a fixed size of 0");
+        }
</ins><span class="cx"> 
</span><span class="cx">         auto dataSize = CheckedSize { *size } * sizeof(T);
</span><span class="cx">         if (UNLIKELY(dataSize.hasOverflowed()))
</span><span class="lines">@@ -105,7 +87,7 @@
</span><span class="cx">         const uint8_t* data = decoder.decodeFixedLengthReference(dataSize, alignof(T));
</span><span class="cx">         if (!data)
</span><span class="cx">             return std::nullopt;
</span><del>-        return ArrayReferenceType(reinterpret_cast<const T*>(data), static_cast<size_t>(*size));
</del><ins>+        return Span<T, Extent>(reinterpret_cast<const T*>(data), static_cast<size_t>(*size));
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformIPCArrayReferenceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Platform/IPC/ArrayReference.h (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Platform/IPC/ArrayReference.h        2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Platform/IPC/ArrayReference.h   2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -26,95 +26,11 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include <limits>
</span><ins>+#include <wtf/Span.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="cx"> 
</span><del>-inline constexpr size_t arrayReferenceDynamicExtent = std::numeric_limits<size_t>::max();
</del><ins>+template <typename T, size_t Extent = WTF::dynamic_extent> using ArrayReference = Span<const T, Extent>;
</ins><span class="cx"> 
</span><del>-template <typename T, size_t Extent = arrayReferenceDynamicExtent>
-class ArrayReference;
-
-template <typename T>
-class ArrayReference<T, arrayReferenceDynamicExtent> {
-public:
-    ArrayReference() = default;
-
-    ArrayReference(const T* data, size_t size)
-        : m_data(data)
-        , m_size(size)
-    {
-    }
-
-    template <size_t inlineCapacity>
-    ArrayReference(const Vector<T, inlineCapacity>& vector)
-        : m_data(vector.data())
-        , m_size(vector.size())
-    {
-    }
-
-    bool isEmpty() const { return !m_size; }
-
-    size_t size() const { return m_size; }
-    const T* data() const
-    {
-        if (isEmpty())
-            return nullptr;
-        return m_data;
-    }
-
-    Vector<T> vector() const
-    {
-        Vector<T> result;
-        result.append(m_data, m_size);
-
-        return result;
-    }
-
-private:
-    const T* m_data { nullptr };
-    size_t m_size { 0 };
-};
-
-template <typename T, size_t Extent>
-class ArrayReference {
-public:
-    ArrayReference() = default;
-
-    ArrayReference(const T* data, size_t size)
-        : m_data(data)
-    {
-        ASSERT_UNUSED(size, size == Extent);
-    }
-
-    template <size_t inlineCapacity>
-    ArrayReference(const Vector<T, inlineCapacity>& vector)
-        : m_data(vector.data())
-    {
-        ASSERT(vector.size() == Extent);
-    }
-
-    constexpr bool isEmpty() const { return !Extent; }
-
-    constexpr size_t size() const { return Extent; }
-
-    const T* data() const
-    {
-        if (isEmpty())
-            return nullptr;
-        return m_data;
-    }
-
-    Vector<T> vector() const
-    {
-        return { m_data, Extent };
-    }
-
-private:
-    const T* m_data { nullptr };
-};
-
-template<typename T, size_t inlineCapacity>
-ArrayReference(const WTF::Vector<T, inlineCapacity>&) -> ArrayReference<T>;
-
</del><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformIPCDataReferenceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Platform/IPC/DataReference.h (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Platform/IPC/DataReference.h 2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Platform/IPC/DataReference.h    2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -29,6 +29,6 @@
</span><span class="cx"> 
</span><span class="cx"> namespace IPC {
</span><span class="cx"> 
</span><del>-using DataReference = ArrayReference<uint8_t, arrayReferenceDynamicExtent>;
</del><ins>+using DataReference = Span<const uint8_t>;
</ins><span class="cx"> 
</span><span class="cx"> } // namespace IPC
</span></span></pre></div>
<a id="trunkSourceWebKitPlatformIPCSharedBufferDataReferencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp   2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp      2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> 
</span><span class="cx"> void SharedBufferDataReference::encode(Encoder& encoder) const
</span><span class="cx"> {
</span><del>-    if (m_data.isEmpty()) {
</del><ins>+    if (m_data.empty()) {
</ins><span class="cx">         SharedBufferCopy::encode(encoder);
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedAPIAPIDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/API/APIData.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/API/APIData.cpp       2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Shared/API/APIData.cpp  2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> 
</span><span class="cx"> RefPtr<Data> Data::create(const IPC::DataReference& data)
</span><span class="cx"> {
</span><del>-    if (data.isEmpty())
</del><ins>+    if (data.empty())
</ins><span class="cx">         return nullptr;
</span><span class="cx">     return create(data.data(), data.size());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedCocoaSandboxExtensionCocoamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm        2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm   2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -167,7 +167,7 @@
</span><span class="cx">     if (!decoder.decode(dataReference))
</span><span class="cx">         return std::nullopt;
</span><span class="cx"> 
</span><del>-    if (dataReference.isEmpty())
</del><ins>+    if (dataReference.empty())
</ins><span class="cx">         return {{ }};
</span><span class="cx"> 
</span><span class="cx">     Handle handle;
</span></span></pre></div>
<a id="trunkSourceWebKitSharedUserDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/UserData.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/UserData.cpp  2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Shared/UserData.cpp     2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -440,7 +440,7 @@
</span><span class="cx">         if (!decoder.decode(dataReference))
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        result = API::SerializedScriptValue::adopt(dataReference.vector());
</del><ins>+        result = API::SerializedScriptValue::adopt({ dataReference });
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitSharedcfArgumentCodersCFcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp       2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp  2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -672,7 +672,7 @@
</span><span class="cx"> #if USE(FOUNDATION)
</span><span class="cx">     // FIXME: Move this to ArgumentCodersCFMac.mm and change this file back to be C++
</span><span class="cx">     // instead of Objective-C++.
</span><del>-    if (urlBytes->isEmpty()) {
</del><ins>+    if (urlBytes->empty()) {
</ins><span class="cx">         // CFURL can't hold an empty URL, unlike NSURL.
</span><span class="cx">         // FIXME: This discards base URL, which seems incorrect.
</span><span class="cx">         return {{ (__bridge CFURLRef)[NSURL URLWithString:@""] }};
</span><span class="lines">@@ -685,7 +685,7 @@
</span><span class="cx">     return WTFMove(result);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-enum class CGColorSpaceEncodingScheme { Name, PropertyList };
</del><ins>+enum class CGColorSpaceEncodingScheme : bool { Name, PropertyList };
</ins><span class="cx"> 
</span><span class="cx"> template<typename Encoder>
</span><span class="cx"> void ArgumentCoder<CGColorSpaceRef>::encode(Encoder& encoder, CGColorSpaceRef colorSpace)
</span><span class="lines">@@ -900,12 +900,4 @@
</span><span class="cx">     >;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-template<> struct EnumTraits<IPC::CGColorSpaceEncodingScheme> {
-    using values = EnumValues<
-        IPC::CGColorSpaceEncodingScheme,
-        IPC::CGColorSpaceEncodingScheme::Name,
-        IPC::CGColorSpaceEncodingScheme::PropertyList
-    >;
-};
-
</del><span class="cx"> } // namespace WTF
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm     2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm        2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -1640,7 +1640,7 @@
</span><span class="cx">         floatRect = WebCore::FloatRect(pdfConfiguration.rect);
</span><span class="cx"> 
</span><span class="cx">     _page->drawToPDF(frameID, floatRect, [handler = makeBlockPtr(completionHandler)](const IPC::DataReference& pdfData) {
</span><del>-        if (pdfData.isEmpty()) {
</del><ins>+        if (pdfData.empty()) {
</ins><span class="cx">             handler(nil, createNSError(WKErrorUnknown).get());
</span><span class="cx">             return;
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessDownloadsDownloadProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp        2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/Downloads/DownloadProxy.cpp   2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -67,7 +67,7 @@
</span><span class="cx"> 
</span><span class="cx"> static RefPtr<API::Data> createData(const IPC::DataReference& data)
</span><span class="cx"> {
</span><del>-    if (data.isEmpty())
</del><ins>+    if (data.empty())
</ins><span class="cx">         return nullptr;
</span><span class="cx">     return API::Data::create(data.data(), data.size());
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessProvisionalPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp   2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/ProvisionalPageProxy.cpp      2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -439,7 +439,7 @@
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx"> void ProvisionalPageProxy::registerWebProcessAccessibilityToken(const IPC::DataReference& data)
</span><span class="cx"> {
</span><del>-    m_accessibilityToken = data.vector();
</del><ins>+    m_accessibilityToken = Vector(data);
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessUserContentWebUserContentControllerProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp      2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp 2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -343,12 +343,12 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     if (!handler->client().supportsAsyncReply()) {
</span><del>-        handler->client().didPostMessage(*page, WTFMove(frameInfoData), handler->world(),  WebCore::SerializedScriptValue::adopt(dataReference.vector()));
</del><ins>+        handler->client().didPostMessage(*page, WTFMove(frameInfoData), handler->world(),  WebCore::SerializedScriptValue::adopt({ dataReference }));
</ins><span class="cx">         reply({ }, { });
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    handler->client().didPostMessageWithAsyncReply(*page, WTFMove(frameInfoData), handler->world(),  WebCore::SerializedScriptValue::adopt(dataReference.vector()), [reply = WTFMove(reply)](API::SerializedScriptValue* value, const String& errorMessage) mutable {
</del><ins>+    handler->client().didPostMessageWithAsyncReply(*page, WTFMove(frameInfoData), handler->world(),  WebCore::SerializedScriptValue::adopt({ dataReference }), [reply = WTFMove(reply)](API::SerializedScriptValue* value, const String& errorMessage) mutable {
</ins><span class="cx">         if (errorMessage.isNull()) {
</span><span class="cx">             ASSERT(value);
</span><span class="cx">             reply({ value->internalRepresentation().toWireBytes() }, { });
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp   2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp      2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -1522,7 +1522,7 @@
</span><span class="cx">     if (!hasRunningProcess())
</span><span class="cx">         launchProcess({ }, ProcessLaunchReason::InitialProcess);
</span><span class="cx"> 
</span><del>-    auto navigation = m_navigationState->createLoadDataNavigation(makeUnique<API::SubstituteData>(data.vector(), MIMEType, encoding, baseURL, userData));
</del><ins>+    auto navigation = m_navigationState->createLoadDataNavigation(makeUnique<API::SubstituteData>(Vector(data), MIMEType, encoding, baseURL, userData));
</ins><span class="cx"> 
</span><span class="cx">     if (shouldForceForegroundPriorityForClientNavigation())
</span><span class="cx">         navigation->setClientNavigationActivity(process().throttler().foregroundActivity("Client navigation"_s));
</span><span class="lines">@@ -1583,7 +1583,7 @@
</span><span class="cx">     if (!hasRunningProcess())
</span><span class="cx">         launchProcess(RegistrableDomain { simulatedRequest.url() }, ProcessLaunchReason::InitialProcess);
</span><span class="cx"> 
</span><del>-    auto navigation = m_navigationState->createSimulatedLoadWithDataNavigation(ResourceRequest(simulatedRequest), makeUnique<API::SubstituteData>(data.vector(), ResourceResponse(simulatedResponse), WebCore::SubstituteData::SessionHistoryVisibility::Visible), m_backForwardList->currentItem());
</del><ins>+    auto navigation = m_navigationState->createSimulatedLoadWithDataNavigation(ResourceRequest(simulatedRequest), makeUnique<API::SubstituteData>(Vector(data), ResourceResponse(simulatedResponse), WebCore::SubstituteData::SessionHistoryVisibility::Visible), m_backForwardList->currentItem());
</ins><span class="cx"> 
</span><span class="cx">     if (shouldForceForegroundPriorityForClientNavigation())
</span><span class="cx">         navigation->setClientNavigationActivity(process().throttler().foregroundActivity("Client navigation"_s));
</span><span class="lines">@@ -4339,7 +4339,7 @@
</span><span class="cx">     sendWithAsyncReply(Messages::WebPage::RunJavaScriptInFrameInScriptWorld(parameters, frameID, world.worldData()), [activity = WTFMove(activity), callbackFunction = WTFMove(callbackFunction)] (const IPC::DataReference& dataReference, std::optional<ExceptionDetails>&& details) mutable {
</span><span class="cx">         if (details)
</span><span class="cx">             return callbackFunction(makeUnexpected(WTFMove(*details)));
</span><del>-        if (dataReference.isEmpty())
</del><ins>+        if (dataReference.empty())
</ins><span class="cx">             return callbackFunction({ nullptr });
</span><span class="cx">         Vector<uint8_t> data;
</span><span class="cx">         data.reserveInitialCapacity(dataReference.size());
</span><span class="lines">@@ -9250,7 +9250,7 @@
</span><span class="cx">     Vector<uint8_t> masterKey;
</span><span class="cx"> 
</span><span class="cx">     if (auto keyData = m_navigationClient->webCryptoMasterKey(*this))
</span><del>-        masterKey = keyData->dataReference().vector();
</del><ins>+        masterKey = Vector(keyData->dataReference());
</ins><span class="cx"> 
</span><span class="cx">     Vector<uint8_t> wrappedKey;
</span><span class="cx">     bool succeeded = wrapSerializedCryptoKey(masterKey, key, wrappedKey);
</span><span class="lines">@@ -9264,7 +9264,7 @@
</span><span class="cx">     Vector<uint8_t> masterKey;
</span><span class="cx"> 
</span><span class="cx">     if (auto keyData = m_navigationClient->webCryptoMasterKey(*this))
</span><del>-        masterKey = keyData->dataReference().vector();
</del><ins>+        masterKey = Vector(keyData->dataReference());
</ins><span class="cx"> 
</span><span class="cx">     Vector<uint8_t> key;
</span><span class="cx">     bool succeeded = unwrapSerializedCryptoKey(masterKey, wrappedKey, key);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ios/WKContentView.mm (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ios/WKContentView.mm       2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentView.mm  2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -899,7 +899,7 @@
</span><span class="cx">     auto retainedSelf = retainPtr(self);
</span><span class="cx">     auto pair = _page->computePagesForPrintingAndDrawToPDF(frameID, printInfo, [retainedSelf](const IPC::DataReference& pdfData) {
</span><span class="cx">         retainedSelf->_pdfPrintCallbackID = 0;
</span><del>-        if (pdfData.isEmpty())
</del><ins>+        if (pdfData.empty())
</ins><span class="cx">             return;
</span><span class="cx"> 
</span><span class="cx">         auto data = adoptCF(CFDataCreate(kCFAllocatorDefault, pdfData.data(), pdfData.size()));
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm     2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/UIProcess/mac/WebPageProxyMac.mm        2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -460,7 +460,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication(const String& suggestedFilename, FrameInfoData&& frameInfo, const IPC::DataReference& data, const String& pdfUUID)
</span><span class="cx"> {
</span><del>-    if (data.isEmpty()) {
</del><ins>+    if (data.empty()) {
</ins><span class="cx">         WTFLogAlways("Cannot save empty PDF file to the temporary directory.");
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessGPUgraphicsRemoteGraphicsContextGLProxyFunctionsGeneratedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp   2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp      2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -686,7 +686,7 @@
</span><span class="cx"> 
</span><span class="cx"> void RemoteGraphicsContextGLProxy::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision)
</span><span class="cx"> {
</span><del>-    IPC::ArrayReference<int32_t, 2> rangeReply;
</del><ins>+    IPC::ArrayReference<int32_t, 2> rangeReply { { } };
</ins><span class="cx">     int32_t precisionReply = { };
</span><span class="cx">     if (!isContextLost()) {
</span><span class="cx">         auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat(shaderType, precisionType), Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat::Reply(rangeReply, precisionReply));
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessNetworkWebSocketChannelcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp      2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp 2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -294,7 +294,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_inspector.didReceiveWebSocketFrame(m_document.get(), createWebSocketFrameForWebInspector(data.data(), data.size(), WebSocketFrame::OpCode::OpCodeBinary));
</span><span class="cx"> 
</span><del>-    m_client->didReceiveBinaryData(data.vector());
</del><ins>+    m_client->didReceiveBinaryData({ data });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebSocketChannel::didClose(unsigned short code, String&& reason)
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessNetworkwebrtcRTCDataChannelRemoteManagercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp    2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp       2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -146,7 +146,7 @@
</span><span class="cx">     Vector<uint8_t> buffer;
</span><span class="cx">     String text;
</span><span class="cx">     if (isRaw)
</span><del>-        buffer = data.vector();
</del><ins>+        buffer = Vector(data);
</ins><span class="cx">     else
</span><span class="cx">         text = String::fromUTF8(data.data(), data.size());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessUserContentWebUserContentControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp  2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/UserContent/WebUserContentController.cpp     2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx">                 return;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            auto value = SerializedScriptValue::createFromWireBytes(resultValue.vector());
</del><ins>+            auto value = SerializedScriptValue::createFromWireBytes({ resultValue });
</ins><span class="cx">             completionHandler(value.ptr(), { });
</span><span class="cx">         };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp       2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp  2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -4794,7 +4794,7 @@
</span><span class="cx">     RELEASE_ASSERT(!sandbox_check(getpid(), "mach-lookup", static_cast<enum sandbox_filter_type>(SANDBOX_FILTER_GLOBAL_NAME | SANDBOX_CHECK_NO_REPORT), "com.apple.iconservices"));
</span><span class="cx"> 
</span><span class="cx">     RefPtr<Icon> icon;
</span><del>-    if (!iconData.isEmpty()) {
</del><ins>+    if (!iconData.empty()) {
</ins><span class="cx">         RetainPtr<CFDataRef> dataRef = adoptCF(CFDataCreate(nullptr, iconData.data(), iconData.size()));
</span><span class="cx">         RetainPtr<CGDataProviderRef> imageProviderRef = adoptCF(CGDataProviderCreateWithCFData(dataRef.get()));
</span><span class="cx">         RetainPtr<CGImageRef> imageRef = adoptCF(CGImageCreateWithJPEGDataProvider(imageProviderRef.get(), nullptr, true, kCGRenderingIntentDefault));
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessWebPagemacWebPageMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm (286814 => 286815)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm 2021-12-10 00:21:17 UTC (rev 286814)
+++ trunk/Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm    2021-12-10 00:23:53 UTC (rev 286815)
</span><span class="lines">@@ -509,7 +509,7 @@
</span><span class="cx"> void WebPage::replaceSelectionWithPasteboardData(const Vector<String>& types, const IPC::DataReference& data)
</span><span class="cx"> {
</span><span class="cx">     for (auto& type : types)
</span><del>-        WebPasteboardOverrides::sharedPasteboardOverrides().addOverride(replaceSelectionPasteboardName(), type, data.vector());
</del><ins>+        WebPasteboardOverrides::sharedPasteboardOverrides().addOverride(replaceSelectionPasteboardName(), type, { data });
</ins><span class="cx"> 
</span><span class="cx">     readSelectionFromPasteboard(replaceSelectionPasteboardName(), [](bool) { });
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>