Diff
Modified: trunk/Source/WebKit/ChangeLog (281276 => 281277)
--- trunk/Source/WebKit/ChangeLog 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/ChangeLog 2021-08-19 23:02:50 UTC (rev 281277)
@@ -1,3 +1,116 @@
+2021-08-19 Alex Christensen <[email protected]>
+
+ Use Vector<SandboxExtension::Handle> instead of SandboxExtension::HandleArray
+ https://bugs.webkit.org/show_bug.cgi?id=229100
+
+ Reviewed by Chris Dumez.
+
+ No change in behavior. Just more modern code.
+
+ * GPUProcess/GPUProcessCreationParameters.cpp:
+ (WebKit::GPUProcessCreationParameters::decode):
+ * GPUProcess/GPUProcessCreationParameters.h:
+ * NetworkProcess/NetworkResourceLoadParameters.cpp:
+ (WebKit::NetworkResourceLoadParameters::encode const):
+ (WebKit::NetworkResourceLoadParameters::decode):
+ * Platform/IPC/FormDataReference.h:
+ (IPC::FormDataReference::encode const):
+ (IPC::FormDataReference::decode):
+ * Shared/Cocoa/LoadParametersCocoa.mm:
+ (WebKit::LoadParameters::platformDecode):
+ * Shared/Cocoa/SandboxExtensionCocoa.mm:
+ (WebKit::createHandlesForResources):
+ (WebKit::SandboxExtension::createReadOnlyHandlesForFiles):
+ (WebKit::SandboxExtension::createHandlesForMachLookup):
+ (WebKit::SandboxExtension::createHandlesForIOKitClassExtensions):
+ (WebKit::SandboxExtension::consumePermanently):
+ (WebKit::SandboxExtension::HandleArray::HandleArray): Deleted.
+ (WebKit::SandboxExtension::HandleArray::~HandleArray): Deleted.
+ (WebKit::SandboxExtension::HandleArray::allocate): Deleted.
+ (WebKit::SandboxExtension::HandleArray::append): Deleted.
+ (WebKit::SandboxExtension::HandleArray::operator[]): Deleted.
+ (WebKit::SandboxExtension::HandleArray::operator[] const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::size const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::encode const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::decode): Deleted.
+ * Shared/Databases/IndexedDB/WebIDBResult.cpp:
+ (WebKit::WebIDBResult::encode const):
+ (WebKit::WebIDBResult::decode):
+ * Shared/Databases/IndexedDB/WebIDBResult.h:
+ (WebKit::WebIDBResult::WebIDBResult):
+ (WebKit::WebIDBResult::handles const):
+ * Shared/LoadParameters.h:
+ * Shared/SandboxExtension.h:
+ (WebKit::SandboxExtension::Handle::decode):
+ (WebKit::SandboxExtension::createReadOnlyHandlesForFiles):
+ (WebKit::SandboxExtension::consumePermanently):
+ (WebKit::SandboxExtension::HandleArray::at): Deleted.
+ (WebKit::SandboxExtension::HandleArray::HandleArray): Deleted.
+ (WebKit::SandboxExtension::HandleArray::~HandleArray): Deleted.
+ (WebKit::SandboxExtension::HandleArray::allocate): Deleted.
+ (WebKit::SandboxExtension::HandleArray::append): Deleted.
+ (WebKit::SandboxExtension::HandleArray::size const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::operator[] const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::operator[]): Deleted.
+ (WebKit::SandboxExtension::HandleArray::begin): Deleted.
+ (WebKit::SandboxExtension::HandleArray::end): Deleted.
+ (WebKit::SandboxExtension::HandleArray::begin const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::end const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::encode const): Deleted.
+ (WebKit::SandboxExtension::HandleArray::decode): Deleted.
+ * Shared/WebPageCreationParameters.cpp:
+ (WebKit::WebPageCreationParameters::decode):
+ * Shared/WebPageCreationParameters.h:
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/Cocoa/WebPageProxyCocoa.mm:
+ (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded):
+ (WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions):
+ * UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
+ (WebKit::WebPasteboardProxy::getPasteboardPathnamesForType):
+ * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+ (WebKit::WebProcessProxy::unblockAccessibilityServerIfNeeded):
+ * UIProcess/Cocoa/WebViewImpl.mm:
+ (WebKit::WebViewImpl::performDragOperation):
+ * UIProcess/UserMediaProcessManager.cpp:
+ (WebKit::UserMediaProcessManager::willCreateMediaStream):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::performDragOperation):
+ (WebKit::WebPageProxy::performDragControllerAction):
+ (WebKit::WebPageProxy::processNextQueuedMouseEvent):
+ (WebKit::WebPageProxy::createNetworkExtensionsSandboxExtensions):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPasteboardProxy.h:
+ * UIProcess/WebPasteboardProxy.messages.in:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::initializeNewWebProcess):
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView dropInteraction:performDrop:]):
+ * WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp:
+ (WebKit::MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions):
+ (WebKit::MediaDeviceSandboxExtensions::encode const):
+ (WebKit::MediaDeviceSandboxExtensions::decode):
+ * WebProcess/MediaStream/MediaDeviceSandboxExtensions.h:
+ * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+ (WebKit::WebPlatformStrategies::getPathnamesForType):
+ * WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
+ (WebKit::WebPage::consumeNetworkExtensionSandboxExtensions):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::mouseEvent):
+ (WebKit::WebPage::didReceivePolicyDecision):
+ (WebKit::WebPage::performDragControllerAction):
+ (WebKit::WebPage::extendSandboxForFilesFromOpenPanel):
+ (WebKit::WebPage::consumeSandboxExtensions):
+ (WebKit::WebPage::consumeNetworkExtensionSandboxExtensions):
+ * WebProcess/WebPage/WebPage.h:
+ * WebProcess/WebPage/WebPage.messages.in:
+ * WebProcess/WebProcess.h:
+ * WebProcess/WebProcess.messages.in:
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::unblockPreferenceService):
+ (WebKit::WebProcess::unblockServicesRequiredByAccessibility):
+
2021-08-19 Simon Fraser <[email protected]>
Replace the uint64_t used to identify taps with an ObjectIdentifier<> type
Modified: trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp (281276 => 281277)
--- trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -91,19 +91,19 @@
result.containerTemporaryDirectoryExtensionHandle = WTFMove(*containerTemporaryDirectoryExtensionHandle);
#endif
#if PLATFORM(IOS_FAMILY)
- std::optional<SandboxExtension::HandleArray> compilerServiceExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> compilerServiceExtensionHandles;
decoder >> compilerServiceExtensionHandles;
if (!compilerServiceExtensionHandles)
return false;
result.compilerServiceExtensionHandles = WTFMove(*compilerServiceExtensionHandles);
- std::optional<SandboxExtension::HandleArray> dynamicIOKitExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> dynamicIOKitExtensionHandles;
decoder >> dynamicIOKitExtensionHandles;
if (!dynamicIOKitExtensionHandles)
return false;
result.dynamicIOKitExtensionHandles = WTFMove(*dynamicIOKitExtensionHandles);
- std::optional<SandboxExtension::HandleArray> dynamicMachExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> dynamicMachExtensionHandles;
decoder >> dynamicMachExtensionHandles;
if (!dynamicMachExtensionHandles)
return false;
Modified: trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h (281276 => 281277)
--- trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/GPUProcess/GPUProcessCreationParameters.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -52,9 +52,9 @@
SandboxExtension::Handle containerTemporaryDirectoryExtensionHandle;
#endif
#if PLATFORM(IOS_FAMILY)
- SandboxExtension::HandleArray compilerServiceExtensionHandles;
- SandboxExtension::HandleArray dynamicIOKitExtensionHandles;
- SandboxExtension::HandleArray dynamicMachExtensionHandles;
+ Vector<SandboxExtension::Handle> compilerServiceExtensionHandles;
+ Vector<SandboxExtension::Handle> dynamicIOKitExtensionHandles;
+ Vector<SandboxExtension::Handle> dynamicMachExtensionHandles;
#endif
String wtfLoggingChannels;
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp (281276 => 281277)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoadParameters.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -51,22 +51,12 @@
if (request.httpBody()) {
request.httpBody()->encode(encoder);
- const Vector<FormDataElement>& elements = request.httpBody()->elements();
- size_t fileCount = 0;
- for (size_t i = 0, count = elements.size(); i < count; ++i) {
- if (WTF::holds_alternative<FormDataElement::EncodedFileData>(elements[i].data))
- ++fileCount;
- }
-
- SandboxExtension::HandleArray requestBodySandboxExtensions;
- requestBodySandboxExtensions.allocate(fileCount);
- size_t extensionIndex = 0;
- for (size_t i = 0, count = elements.size(); i < count; ++i) {
- const FormDataElement& element = elements[i];
+ Vector<SandboxExtension::Handle> requestBodySandboxExtensions;
+ for (const FormDataElement& element : request.httpBody()->elements()) {
if (auto* fileData = WTF::get_if<FormDataElement::EncodedFileData>(element.data)) {
const String& path = fileData->filename;
if (auto handle = SandboxExtension::createHandle(path, SandboxExtension::Type::ReadOnly))
- requestBodySandboxExtensions[extensionIndex++] = WTFMove(*handle);
+ requestBodySandboxExtensions.append(WTFMove(*handle));
}
}
encoder << requestBodySandboxExtensions;
@@ -178,12 +168,12 @@
return std::nullopt;
result.request.setHTTPBody(WTFMove(formData));
- std::optional<SandboxExtension::HandleArray> requestBodySandboxExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> requestBodySandboxExtensionHandles;
decoder >> requestBodySandboxExtensionHandles;
if (!requestBodySandboxExtensionHandles)
return std::nullopt;
- for (size_t i = 0; i < requestBodySandboxExtensionHandles->size(); ++i) {
- if (auto extension = SandboxExtension::create(WTFMove(requestBodySandboxExtensionHandles->at(i))))
+ for (auto& handle : WTFMove(*requestBodySandboxExtensionHandles)) {
+ if (auto extension = SandboxExtension::create(WTFMove(handle)))
result.requestBodySandboxExtensions.append(WTFMove(extension));
}
}
Modified: trunk/Source/WebKit/Platform/IPC/FormDataReference.h (281276 => 281277)
--- trunk/Source/WebKit/Platform/IPC/FormDataReference.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Platform/IPC/FormDataReference.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -50,19 +50,12 @@
encoder << *m_data;
- auto& elements = m_data->elements();
- size_t fileCount = std::count_if(elements.begin(), elements.end(), [](auto& element) {
- return WTF::holds_alternative<WebCore::FormDataElement::EncodedFileData>(element.data);
- });
-
- WebKit::SandboxExtension::HandleArray sandboxExtensionHandles;
- sandboxExtensionHandles.allocate(fileCount);
- size_t extensionIndex = 0;
- for (auto& element : elements) {
+ Vector<WebKit::SandboxExtension::Handle> sandboxExtensionHandles;
+ for (auto& element : m_data->elements()) {
if (auto* fileData = WTF::get_if<WebCore::FormDataElement::EncodedFileData>(element.data)) {
const String& path = fileData->filename;
if (auto handle = WebKit::SandboxExtension::createHandle(path, WebKit::SandboxExtension::Type::ReadOnly))
- sandboxExtensionHandles[extensionIndex++] = WTFMove(*handle);
+ sandboxExtensionHandles.append(WTFMove(*handle));
}
}
encoder << sandboxExtensionHandles;
@@ -81,7 +74,7 @@
if (!formData)
return std::nullopt;
- std::optional<WebKit::SandboxExtension::HandleArray> sandboxExtensionHandles;
+ std::optional<Vector<WebKit::SandboxExtension::Handle>> sandboxExtensionHandles;
decoder >> sandboxExtensionHandles;
if (!sandboxExtensionHandles)
return std::nullopt;
Modified: trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/Cocoa/LoadParametersCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -49,7 +49,7 @@
if (!IPC::decode(decoder, parameters.dataDetectionContext))
return false;
- std::optional<SandboxExtension::HandleArray> networkExtensionSandboxExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> networkExtensionSandboxExtensionHandles;
decoder >> networkExtensionSandboxExtensionHandles;
if (!networkExtensionSandboxExtensionHandles)
return false;
Modified: trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -172,71 +172,6 @@
return WTFMove(handle);
}
-SandboxExtension::HandleArray::HandleArray()
-{
-}
-
-SandboxExtension::HandleArray::~HandleArray()
-{
-}
-
-void SandboxExtension::HandleArray::allocate(size_t size)
-{
- if (!size)
- return;
-
- ASSERT(m_data.isEmpty());
-
- m_data.resize(size);
-}
-
-void SandboxExtension::HandleArray::append(Handle&& handle)
-{
- m_data.append(WTFMove(handle));
-}
-
-SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t i)
-{
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(i < m_data.size());
- return m_data[i];
-}
-
-const SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t i) const
-{
- RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(i < m_data.size());
- return m_data[i];
-}
-
-size_t SandboxExtension::HandleArray::size() const
-{
- return m_data.size();
-}
-
-void SandboxExtension::HandleArray::encode(IPC::Encoder& encoder) const
-{
- encoder << static_cast<uint64_t>(size());
- for (auto& handle : m_data)
- encoder << handle;
-}
-
-std::optional<SandboxExtension::HandleArray> SandboxExtension::HandleArray::decode(IPC::Decoder& decoder)
-{
- std::optional<uint64_t> size;
- decoder >> size;
- if (!size)
- return std::nullopt;
-
- SandboxExtension::HandleArray handles;
- for (size_t i = 0; i < *size; ++i) {
- std::optional<SandboxExtension::Handle> handle;
- decoder >> handle;
- if (!handle)
- return std::nullopt;
- handles.append(WTFMove(*handle));
- }
- return WTFMove(handles);
-}
-
RefPtr<SandboxExtension> SandboxExtension::create(Handle&& handle)
{
if (!handle.m_sandboxExtension)
@@ -295,26 +230,17 @@
}
template <typename T>
-static SandboxExtension::HandleArray createHandlesForResources(const Vector<T>& resources, Function<std::optional<SandboxExtension::Handle>(const T&)>&& createFunction)
+static Vector<SandboxExtension::Handle> createHandlesForResources(const Vector<T>& resources, Function<std::optional<SandboxExtension::Handle>(const T&)>&& createFunction)
{
- SandboxExtension::HandleArray handleArray;
-
- if (resources.size() > 0)
- handleArray.allocate(resources.size());
-
- size_t currentHandle = 0;
+ Vector<SandboxExtension::Handle> handleArray;
for (const auto& resource : resources) {
- auto handle = createFunction(resource);
- if (!handle)
- continue;
- handleArray[currentHandle] = WTFMove(*handle);
- ++currentHandle;
+ if (auto handle = createFunction(resource))
+ handleArray.append(WTFMove(*handle));
}
-
return handleArray;
}
-SandboxExtension::HandleArray SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral logLabel, const Vector<String>& paths)
+auto SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral logLabel, const Vector<String>& paths) -> Vector<Handle>
{
return createHandlesForResources<String>(paths, [&logLabel] (const String& path) {
auto handle = SandboxExtension::createHandle(path, SandboxExtension::Type::ReadOnly);
@@ -394,7 +320,7 @@
return WTFMove(handle);
}
-SandboxExtension::HandleArray SandboxExtension::createHandlesForMachLookup(const Vector<ASCIILiteral>& services, std::optional<audit_token_t> auditToken, OptionSet<Flags> flags)
+auto SandboxExtension::createHandlesForMachLookup(const Vector<ASCIILiteral>& services, std::optional<audit_token_t> auditToken, OptionSet<Flags> flags) -> Vector<Handle>
{
return createHandlesForResources<ASCIILiteral>(services, [auditToken, flags] (const ASCIILiteral& service) -> std::optional<Handle> {
auto handle = SandboxExtension::createHandleForMachLookup(service, auditToken, flags);
@@ -431,7 +357,7 @@
return WTFMove(handle);
}
-SandboxExtension::HandleArray SandboxExtension::createHandlesForIOKitClassExtensions(const Vector<ASCIILiteral>& iokitClasses, std::optional<audit_token_t> auditToken, OptionSet<Flags> flags)
+auto SandboxExtension::createHandlesForIOKitClassExtensions(const Vector<ASCIILiteral>& iokitClasses, std::optional<audit_token_t> auditToken, OptionSet<Flags> flags) -> Vector<Handle>
{
return createHandlesForResources<ASCIILiteral>(iokitClasses, [auditToken, flags] (const ASCIILiteral& iokitClass) {
auto handle = SandboxExtension::createHandleForIOKitClassExtension(iokitClass, auditToken, flags);
@@ -499,7 +425,7 @@
return result;
}
-bool SandboxExtension::consumePermanently(const HandleArray& handleArray)
+bool SandboxExtension::consumePermanently(const Vector<Handle>& handleArray)
{
bool allSucceeded = true;
for (auto& handle : handleArray) {
Modified: trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.cpp (281276 => 281277)
--- trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -32,8 +32,8 @@
void WebIDBResult::encode(IPC::Encoder& encoder) const
{
- m_resultData.encode(encoder);
- m_handles.encode(encoder);
+ encoder << m_resultData;
+ encoder << m_handles;
}
bool WebIDBResult::decode(IPC::Decoder& decoder, WebIDBResult& result)
@@ -44,7 +44,7 @@
return false;
result.m_resultData = WTFMove(*resultData);
- std::optional<SandboxExtension::HandleArray> handles;
+ std::optional<Vector<SandboxExtension::Handle>> handles;
decoder >> handles;
if (!handles)
return false;
Modified: trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h (281276 => 281277)
--- trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/Databases/IndexedDB/WebIDBResult.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -43,7 +43,7 @@
{
}
- WebIDBResult(const WebCore::IDBResultData& resultData, SandboxExtension::HandleArray&& handles)
+ WebIDBResult(const WebCore::IDBResultData& resultData, Vector<SandboxExtension::Handle>&& handles)
: m_resultData(resultData)
, m_handles(WTFMove(handles))
{
@@ -53,7 +53,7 @@
WebIDBResult& operator=(WebIDBResult&&) = default;
const WebCore::IDBResultData& resultData() const { return m_resultData; }
- const SandboxExtension::HandleArray& handles() const { return m_handles; }
+ const Vector<SandboxExtension::Handle>& handles() const { return m_handles; }
void encode(IPC::Encoder&) const;
static WARN_UNUSED_RETURN bool decode(IPC::Decoder&, WebIDBResult&);
@@ -60,7 +60,7 @@
private:
WebCore::IDBResultData m_resultData;
- SandboxExtension::HandleArray m_handles;
+ Vector<SandboxExtension::Handle> m_handles;
};
} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/LoadParameters.h (281276 => 281277)
--- trunk/Source/WebKit/Shared/LoadParameters.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/LoadParameters.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -76,7 +76,7 @@
#if PLATFORM(COCOA)
RetainPtr<NSDictionary> dataDetectionContext;
- SandboxExtension::HandleArray networkExtensionSandboxExtensionHandles;
+ Vector<SandboxExtension::Handle> networkExtensionSandboxExtensionHandles;
#endif
#if PLATFORM(IOS)
std::optional<SandboxExtension::Handle> contentFilterExtensionHandle;
Modified: trunk/Source/WebKit/Shared/SandboxExtension.h (281276 => 281277)
--- trunk/Source/WebKit/Shared/SandboxExtension.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/SandboxExtension.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -45,7 +45,7 @@
class SandboxExtension : public RefCounted<SandboxExtension> {
public:
- enum class Type {
+ enum class Type : uint8_t {
ReadOnly,
ReadWrite,
Mach,
@@ -82,38 +82,10 @@
mutable std::unique_ptr<SandboxExtensionImpl> m_sandboxExtension;
#endif
};
-
- class HandleArray {
- WTF_MAKE_NONCOPYABLE(HandleArray);
- public:
- HandleArray();
- HandleArray(HandleArray&&) = default;
- HandleArray& operator=(HandleArray&&) = default;
- ~HandleArray();
- void allocate(size_t);
- void append(Handle&&);
- Handle& operator[](size_t i);
- Handle& at(size_t i) { return operator[](i); }
- const Handle& operator[](size_t i) const;
- Handle* begin();
- Handle* end();
- const Handle* begin() const;
- const Handle* end() const;
- size_t size() const;
- void encode(IPC::Encoder&) const;
- static std::optional<HandleArray> decode(IPC::Decoder&);
-
- private:
-#if ENABLE(SANDBOX_EXTENSIONS)
- Vector<Handle> m_data;
-#else
- Handle m_emptyHandle;
-#endif
- };
static RefPtr<SandboxExtension> create(Handle&&);
static std::optional<Handle> createHandle(const String& path, Type);
- static SandboxExtension::HandleArray createReadOnlyHandlesForFiles(ASCIILiteral logLabel, const Vector<String>& paths);
+ static Vector<Handle> createReadOnlyHandlesForFiles(ASCIILiteral logLabel, const Vector<String>& paths);
static std::optional<Handle> createHandleWithoutResolvingPath(const String& path, Type);
static std::optional<Handle> createHandleForReadWriteDirectory(const String& path); // Will attempt to create the directory.
static std::optional<std::pair<Handle, String>> createHandleForTemporaryFile(const String& prefix, Type);
@@ -120,10 +92,10 @@
static std::optional<Handle> createHandleForGenericExtension(ASCIILiteral extensionClass);
#if HAVE(AUDIT_TOKEN)
static std::optional<Handle> createHandleForMachLookup(ASCIILiteral service, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
- static HandleArray createHandlesForMachLookup(const Vector<ASCIILiteral>& services, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
+ static Vector<Handle> createHandlesForMachLookup(const Vector<ASCIILiteral>& services, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
static std::optional<Handle> createHandleForReadByAuditToken(const String& path, audit_token_t);
static std::optional<Handle> createHandleForIOKitClassExtension(ASCIILiteral iokitClass, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
- static HandleArray createHandlesForIOKitClassExtensions(const Vector<ASCIILiteral>& iokitClasses, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
+ static Vector<Handle> createHandlesForIOKitClassExtensions(const Vector<ASCIILiteral>& iokitClasses, std::optional<audit_token_t>, OptionSet<Flags> = Flags::Default);
#endif
~SandboxExtension();
@@ -131,8 +103,10 @@
bool revoke();
bool consumePermanently();
+
+ // FIXME: These should not be const.
static bool consumePermanently(const Handle&);
- static bool consumePermanently(const HandleArray&);
+ static bool consumePermanently(const Vector<SandboxExtension::Handle>&);
private:
explicit SandboxExtension(const Handle&);
@@ -148,22 +122,9 @@
inline SandboxExtension::Handle::~Handle() { }
inline void SandboxExtension::Handle::encode(IPC::Encoder&) const { }
inline std::optional<SandboxExtension::Handle> SandboxExtension::Handle::decode(IPC::Decoder&) { return SandboxExtension::Handle { }; }
-inline SandboxExtension::HandleArray::HandleArray() { }
-inline SandboxExtension::HandleArray::~HandleArray() { }
-inline void SandboxExtension::HandleArray::allocate(size_t) { }
-inline void SandboxExtension::HandleArray::append(Handle&&) { }
-inline size_t SandboxExtension::HandleArray::size() const { return 0; }
-inline const SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t) const { return m_emptyHandle; }
-inline SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t) { return m_emptyHandle; }
-inline SandboxExtension::Handle* SandboxExtension::HandleArray::begin() { return &m_emptyHandle; }
-inline SandboxExtension::Handle* SandboxExtension::HandleArray::end() { return &m_emptyHandle; }
-inline const SandboxExtension::Handle* SandboxExtension::HandleArray::begin() const { return &m_emptyHandle; }
-inline const SandboxExtension::Handle* SandboxExtension::HandleArray::end() const { return &m_emptyHandle; }
-inline void SandboxExtension::HandleArray::encode(IPC::Encoder&) const { }
-inline auto SandboxExtension::HandleArray::decode(IPC::Decoder&) -> std::optional<HandleArray> { return { HandleArray() }; }
inline RefPtr<SandboxExtension> SandboxExtension::create(Handle&&) { return nullptr; }
inline auto SandboxExtension::createHandle(const String&, Type) -> std::optional<Handle> { return Handle { }; }
-inline SandboxExtension::HandleArray SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral, const Vector<String>&) { return { }; }
+inline auto SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral, const Vector<String>&) -> Vector<Handle> { return { }; }
inline auto SandboxExtension::createHandleWithoutResolvingPath(const String&, Type) -> std::optional<Handle> { return Handle { }; }
inline auto SandboxExtension::createHandleForReadWriteDirectory(const String&) -> std::optional<Handle> { return Handle { }; }
inline auto SandboxExtension::createHandleForTemporaryFile(const String& /*prefix*/, Type) -> std::optional<std::pair<Handle, String>> { return std::optional<std::pair<Handle, String>> { std::pair<Handle, String> { Handle { }, String { } } }; }
@@ -173,15 +134,11 @@
inline bool SandboxExtension::consume() { return true; }
inline bool SandboxExtension::consumePermanently() { return true; }
inline bool SandboxExtension::consumePermanently(const Handle&) { return true; }
-inline bool SandboxExtension::consumePermanently(const HandleArray&) { return true; }
+inline bool SandboxExtension::consumePermanently(const Vector<Handle>&) { return true; }
inline String stringByResolvingSymlinksInPath(const String& path) { return path; }
inline String resolvePathForSandboxExtension(const String& path) { return path; }
inline String resolveAndCreateReadWriteDirectoryForSandboxExtension(const String& path) { return path; }
#else
-inline SandboxExtension::Handle* SandboxExtension::HandleArray::begin() { return m_data.begin(); }
-inline SandboxExtension::Handle* SandboxExtension::HandleArray::end() { return m_data.end(); }
-inline const SandboxExtension::Handle* SandboxExtension::HandleArray::begin() const { return m_data.begin(); }
-inline const SandboxExtension::Handle* SandboxExtension::HandleArray::end() const { return m_data.end(); }
String stringByResolvingSymlinksInPath(const String& path);
String resolvePathForSandboxExtension(const String& path);
String resolveAndCreateReadWriteDirectoryForSandboxExtension(const String& path);
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp (281276 => 281277)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -357,7 +357,7 @@
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
- std::optional<std::optional<SandboxExtension::HandleArray>> attachmentElementExtensionHandles;
+ std::optional<std::optional<Vector<SandboxExtension::Handle>>> attachmentElementExtensionHandles;
decoder >> attachmentElementExtensionHandles;
if (!attachmentElementExtensionHandles)
return std::nullopt;
@@ -392,13 +392,13 @@
return std::nullopt;
// FIXME(207716): The following should be removed when the GPU process is complete.
- std::optional<SandboxExtension::HandleArray> mediaExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> mediaExtensionHandles;
decoder >> mediaExtensionHandles;
if (!mediaExtensionHandles)
return std::nullopt;
parameters.mediaExtensionHandles = WTFMove(*mediaExtensionHandles);
- std::optional<SandboxExtension::HandleArray> mediaIOKitExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> mediaIOKitExtensionHandles;
decoder >> mediaIOKitExtensionHandles;
if (!mediaIOKitExtensionHandles)
return std::nullopt;
@@ -405,13 +405,13 @@
parameters.mediaIOKitExtensionHandles = WTFMove(*mediaIOKitExtensionHandles);
// FIXME(207716): End region to remove.
- std::optional<SandboxExtension::HandleArray> gpuIOKitExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> gpuIOKitExtensionHandles;
decoder >> gpuIOKitExtensionHandles;
if (!gpuIOKitExtensionHandles)
return std::nullopt;
parameters.gpuIOKitExtensionHandles = WTFMove(*gpuIOKitExtensionHandles);
- std::optional<SandboxExtension::HandleArray> gpuMachExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> gpuMachExtensionHandles;
decoder >> gpuMachExtensionHandles;
if (!gpuMachExtensionHandles)
return std::nullopt;
Modified: trunk/Source/WebKit/Shared/WebPageCreationParameters.h (281276 => 281277)
--- trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/WebPageCreationParameters.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -160,7 +160,7 @@
std::optional<WebCore::ViewportArguments> overrideViewportArguments;
#endif
#if ENABLE(ATTACHMENT_ELEMENT)
- std::optional<SandboxExtension::HandleArray> attachmentElementExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> attachmentElementExtensionHandles;
#endif
#if PLATFORM(IOS_FAMILY)
WebCore::FloatSize screenSize;
@@ -176,10 +176,10 @@
#if PLATFORM(COCOA)
bool smartInsertDeleteEnabled;
Vector<String> additionalSupportedImageTypes;
- SandboxExtension::HandleArray mediaExtensionHandles; // FIXME(207716): Remove when GPU process is complete.
- SandboxExtension::HandleArray mediaIOKitExtensionHandles;
- SandboxExtension::HandleArray gpuIOKitExtensionHandles;
- SandboxExtension::HandleArray gpuMachExtensionHandles;
+ Vector<SandboxExtension::Handle> mediaExtensionHandles; // FIXME(207716): Remove when GPU process is complete.
+ Vector<SandboxExtension::Handle> mediaIOKitExtensionHandles;
+ Vector<SandboxExtension::Handle> gpuIOKitExtensionHandles;
+ Vector<SandboxExtension::Handle> gpuMachExtensionHandles;
#endif
#if HAVE(STATIC_FONT_REGISTRY)
std::optional<SandboxExtension::Handle> fontMachExtensionHandle;
Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp (281276 => 281277)
--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -226,7 +226,7 @@
return false;
parameters.injectedBundlePathExtensionHandle = WTFMove(*injectedBundlePathExtensionHandle);
- std::optional<SandboxExtension::HandleArray> additionalSandboxExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> additionalSandboxExtensionHandles;
decoder >> additionalSandboxExtensionHandles;
if (!additionalSandboxExtensionHandles)
return false;
@@ -446,7 +446,7 @@
parameters.websiteDataStoreParameters = WTFMove(*websiteDataStoreParameters);
#if PLATFORM(IOS)
- std::optional<SandboxExtension::HandleArray> compilerServiceExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> compilerServiceExtensionHandles;
decoder >> compilerServiceExtensionHandles;
if (!compilerServiceExtensionHandles)
return false;
@@ -472,7 +472,7 @@
parameters.launchServicesExtensionHandle = WTFMove(*launchServicesExtensionHandle);
#if HAVE(VIDEO_RESTRICTED_DECODING)
- std::optional<SandboxExtension::HandleArray> videoDecoderExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> videoDecoderExtensionHandles;
decoder >> videoDecoderExtensionHandles;
if (!videoDecoderExtensionHandles)
return false;
@@ -479,7 +479,7 @@
parameters.videoDecoderExtensionHandles = WTFMove(*videoDecoderExtensionHandles);
#endif
- std::optional<SandboxExtension::HandleArray> diagnosticsExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> diagnosticsExtensionHandles;
decoder >> diagnosticsExtensionHandles;
if (!diagnosticsExtensionHandles)
return false;
@@ -486,13 +486,13 @@
parameters.diagnosticsExtensionHandles = WTFMove(*diagnosticsExtensionHandles);
#if PLATFORM(IOS_FAMILY)
- std::optional<SandboxExtension::HandleArray> dynamicMachExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> dynamicMachExtensionHandles;
decoder >> dynamicMachExtensionHandles;
if (!dynamicMachExtensionHandles)
return false;
parameters.dynamicMachExtensionHandles = WTFMove(*dynamicMachExtensionHandles);
- std::optional<SandboxExtension::HandleArray> dynamicIOKitExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> dynamicIOKitExtensionHandles;
decoder >> dynamicIOKitExtensionHandles;
if (!dynamicIOKitExtensionHandles)
return false;
@@ -541,7 +541,7 @@
#if PLATFORM(COCOA)
#if ENABLE(CFPREFS_DIRECT_MODE)
- std::optional<std::optional<SandboxExtension::HandleArray>> preferencesExtensionHandles;
+ std::optional<std::optional<Vector<SandboxExtension::Handle>>> preferencesExtensionHandles;
decoder >> preferencesExtensionHandles;
if (!preferencesExtensionHandles)
return false;
Modified: trunk/Source/WebKit/Shared/WebProcessCreationParameters.h (281276 => 281277)
--- trunk/Source/WebKit/Shared/WebProcessCreationParameters.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/Shared/WebProcessCreationParameters.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -78,7 +78,7 @@
String injectedBundlePath;
SandboxExtension::Handle injectedBundlePathExtensionHandle;
- SandboxExtension::HandleArray additionalSandboxExtensionHandles;
+ Vector<SandboxExtension::Handle> additionalSandboxExtensionHandles;
UserData initializationUserData;
@@ -205,7 +205,7 @@
std::optional<WebProcessDataStoreParameters> websiteDataStoreParameters;
#if PLATFORM(IOS)
- SandboxExtension::HandleArray compilerServiceExtensionHandles;
+ Vector<SandboxExtension::Handle> compilerServiceExtensionHandles;
#endif
std::optional<SandboxExtension::Handle> containerManagerExtensionHandle;
@@ -212,13 +212,13 @@
std::optional<SandboxExtension::Handle> mobileGestaltExtensionHandle;
std::optional<SandboxExtension::Handle> launchServicesExtensionHandle;
#if HAVE(VIDEO_RESTRICTED_DECODING)
- SandboxExtension::HandleArray videoDecoderExtensionHandles;
+ Vector<SandboxExtension::Handle> videoDecoderExtensionHandles;
#endif
- SandboxExtension::HandleArray diagnosticsExtensionHandles;
+ Vector<SandboxExtension::Handle> diagnosticsExtensionHandles;
#if PLATFORM(IOS_FAMILY)
- SandboxExtension::HandleArray dynamicMachExtensionHandles;
- SandboxExtension::HandleArray dynamicIOKitExtensionHandles;
+ Vector<SandboxExtension::Handle> dynamicMachExtensionHandles;
+ Vector<SandboxExtension::Handle> dynamicIOKitExtensionHandles;
#endif
#if PLATFORM(COCOA)
@@ -237,7 +237,7 @@
#if PLATFORM(COCOA)
#if ENABLE(CFPREFS_DIRECT_MODE)
- std::optional<SandboxExtension::HandleArray> preferencesExtensionHandles;
+ std::optional<Vector<SandboxExtension::Handle>> preferencesExtensionHandles;
#endif
#endif
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -191,7 +191,7 @@
#endif
}
-void WebPageProxy::createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, SandboxExtension::HandleArray& fileUploadHandles)
+void WebPageProxy::createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, Vector<SandboxExtension::Handle>& fileUploadHandles)
{
if (!files.size())
return;
@@ -209,13 +209,11 @@
}
}
- fileUploadHandles.allocate(files.size());
- for (size_t i = 0; i< files.size(); i++) {
- NSString *file = files[i];
+ for (auto& file : files) {
if (![[NSFileManager defaultManager] fileExistsAtPath:file])
continue;
if (auto handle = SandboxExtension::createHandle(file, SandboxExtension::Type::ReadOnly))
- fileUploadHandles[i] = WTFMove(*handle);
+ fileUploadHandles.append(WTFMove(*handle));
}
}
@@ -630,7 +628,7 @@
#endif
-SandboxExtension::HandleArray WebPageProxy::createNetworkExtensionsSandboxExtensions(WebProcessProxy& process)
+Vector<SandboxExtension::Handle> WebPageProxy::createNetworkExtensionsSandboxExtensions(WebProcessProxy& process)
{
#if ENABLE(CONTENT_FILTERING)
if (!process.hasNetworkExtensionSandboxAccess() && NetworkExtensionContentFilter::isRequired()) {
@@ -644,7 +642,7 @@
return SandboxExtension::createHandlesForMachLookup({ neHelperService, neSessionManagerService }, std::nullopt);
}
#endif
- return SandboxExtension::HandleArray();
+ return { };
}
#if ENABLE(CONTEXT_MENUS)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -155,7 +155,7 @@
}
void WebPasteboardProxy::getPasteboardPathnamesForType(IPC::Connection& connection, const String& pasteboardName, const String& pasteboardType, std::optional<PageIdentifier> pageID,
- CompletionHandler<void(Vector<String>&& pathnames, SandboxExtension::HandleArray&& sandboxExtensions)>&& completionHandler)
+ CompletionHandler<void(Vector<String>&& pathnames, Vector<SandboxExtension::Handle>&& sandboxExtensions)>&& completionHandler)
{
MESSAGE_CHECK_COMPLETION(!pasteboardType.isEmpty(), completionHandler({ }, { }));
@@ -168,18 +168,17 @@
PlatformPasteboard::performAsDataOwner(*dataOwner, [&] {
Vector<String> pathnames;
- SandboxExtension::HandleArray sandboxExtensions;
+ Vector<SandboxExtension::Handle> sandboxExtensions;
if (webProcessProxyForConnection(connection)) {
PlatformPasteboard(pasteboardName).getPathnamesForType(pathnames, pasteboardType);
#if PLATFORM(MAC)
// On iOS, files are copied into app's container upon paste.
- sandboxExtensions.allocate(pathnames.size());
for (size_t i = 0; i < pathnames.size(); i++) {
auto& filename = pathnames[i];
if (![[NSFileManager defaultManager] fileExistsAtPath:filename])
continue;
if (auto handle = SandboxExtension::createHandle(filename, SandboxExtension::Type::ReadOnly))
- sandboxExtensions[i] = WTFMove(*handle);
+ sandboxExtensions.append(WTFMove(*handle));
}
#endif
}
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -246,7 +246,7 @@
if (!canSendMessage())
return;
- SandboxExtension::HandleArray handleArray;
+ Vector<SandboxExtension::Handle> handleArray;
#if PLATFORM(IOS_FAMILY)
handleArray = SandboxExtension::createHandlesForMachLookup({ "com.apple.iphone.axserver-systemwide"_s, "com.apple.frontboard.systemappservices"_s }, connection() ? connection()->getAuditToken() : std::nullopt);
ASSERT(handleArray.size() == 2);
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -4278,7 +4278,7 @@
NSArray *types = draggingInfo.draggingPasteboard.types;
SandboxExtension::Handle sandboxExtensionHandle;
- SandboxExtension::HandleArray sandboxExtensionForUpload;
+ Vector<SandboxExtension::Handle> sandboxExtensionForUpload;
if (![types containsObject:PasteboardTypes::WebArchivePboardType] && [types containsObject:WebCore::legacyFilesPromisePasteboardType()]) {
@@ -4314,7 +4314,7 @@
fileNames->append(path.get());
if (fileNames->size() == fileCount) {
SandboxExtension::Handle sandboxExtensionHandle;
- SandboxExtension::HandleArray sandboxExtensionForUpload;
+ Vector<SandboxExtension::Handle> sandboxExtensionForUpload;
m_page->createSandboxExtensionsIfNeeded(*fileNames, sandboxExtensionHandle, sandboxExtensionForUpload);
dragData->setFileNames(*fileNames);
Modified: trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -93,7 +93,7 @@
}
if (extensionCount) {
- SandboxExtension::HandleArray handles;
+ Vector<SandboxExtension::Handle> handles;
Vector<String> ids;
if (!proxy.page().preferences().mockCaptureDevicesEnabled()) {
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -2648,12 +2648,12 @@
performDragControllerAction(DragControllerAction::Exited, dragData, dragStorageName, { }, { });
}
-void WebPageProxy::performDragOperation(DragData& dragData, const String& dragStorageName, SandboxExtension::Handle&& sandboxExtensionHandle, SandboxExtension::HandleArray&& sandboxExtensionsForUpload)
+void WebPageProxy::performDragOperation(DragData& dragData, const String& dragStorageName, SandboxExtension::Handle&& sandboxExtensionHandle, Vector<SandboxExtension::Handle>&& sandboxExtensionsForUpload)
{
performDragControllerAction(DragControllerAction::PerformDragOperation, dragData, dragStorageName, WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionsForUpload));
}
-void WebPageProxy::performDragControllerAction(DragControllerAction action, DragData& dragData, const String& dragStorageName, SandboxExtension::Handle&& sandboxExtensionHandle, SandboxExtension::HandleArray&& sandboxExtensionsForUpload)
+void WebPageProxy::performDragControllerAction(DragControllerAction action, DragData& dragData, const String& dragStorageName, SandboxExtension::Handle&& sandboxExtensionHandle, Vector<SandboxExtension::Handle>&& sandboxExtensionsForUpload)
{
if (!hasRunningProcess())
return;
@@ -2820,7 +2820,7 @@
m_process->startResponsivenessTimer();
}
- std::optional<SandboxExtension::HandleArray> sandboxExtensions;
+ std::optional<Vector<SandboxExtension::Handle>> sandboxExtensions;
#if PLATFORM(MAC)
bool eventMayStartDrag = !m_currentDragOperation && eventType == WebEvent::MouseMove && event.button() != WebMouseEvent::Button::NoButton;
@@ -10791,9 +10791,9 @@
#endif
#if !PLATFORM(COCOA)
-SandboxExtension::HandleArray WebPageProxy::createNetworkExtensionsSandboxExtensions(WebProcessProxy& process)
+Vector<SandboxExtension::Handle> WebPageProxy::createNetworkExtensionsSandboxExtensions(WebProcessProxy& process)
{
- return SandboxExtension::HandleArray();
+ return { };
}
#endif
Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.h (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/WebPageProxy.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -1220,7 +1220,7 @@
void dragEntered(WebCore::DragData&, const String& dragStorageName = String());
void dragUpdated(WebCore::DragData&, const String& dragStorageName = String());
void dragExited(WebCore::DragData&, const String& dragStorageName = String());
- void performDragOperation(WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
+ void performDragOperation(WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
void didPerformDragOperation(bool handled);
void didPerformDragControllerAction(std::optional<WebCore::DragOperation>, WebCore::DragHandlingMethod, bool mouseIsOverFileInput, unsigned numberOfItemsToBeAccepted, const WebCore::IntRect& insertionRect, const WebCore::IntRect& editableElementRect);
@@ -1652,7 +1652,7 @@
WebURLSchemeHandler* urlSchemeHandlerForScheme(const String& scheme);
#if PLATFORM(COCOA)
- void createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, SandboxExtension::HandleArray& fileUploadHandles);
+ void createSandboxExtensionsIfNeeded(const Vector<String>& files, SandboxExtension::Handle& fileReadHandle, Vector<SandboxExtension::Handle>& fileUploadHandles);
#endif
void editorStateChanged(const EditorState&);
bool updateEditorState(const EditorState& newEditorState);
@@ -2365,7 +2365,7 @@
RetainPtr<NSArray> m_dataDetectionResults;
#endif
- void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
+ void performDragControllerAction(DragControllerAction, WebCore::DragData&, const String& dragStorageName, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
void updateBackingStoreDiscardableState();
@@ -2517,7 +2517,7 @@
bool setIsNavigatingToAppBoundDomainAndCheckIfPermitted(bool isMainFrame, const URL&, std::optional<NavigatingToAppBoundDomain>);
#endif
- static SandboxExtension::HandleArray createNetworkExtensionsSandboxExtensions(WebProcessProxy&);
+ static Vector<SandboxExtension::Handle> createNetworkExtensionsSandboxExtensions(WebProcessProxy&);
static SandboxExtension::Handle fontdMachExtensionHandle();
Modified: trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/WebPasteboardProxy.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -92,7 +92,7 @@
#if PLATFORM(COCOA)
void getNumberOfFiles(IPC::Connection&, const String& pasteboardName, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(uint64_t)>&&);
void getPasteboardTypes(IPC::Connection&, const String& pasteboardName, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<String>&&)>&&);
- void getPasteboardPathnamesForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<String>&& pathnames, SandboxExtension::HandleArray&&)>&&);
+ void getPasteboardPathnamesForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<String>&& pathnames, Vector<SandboxExtension::Handle>&&)>&&);
void getPasteboardStringForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(String&&)>&&);
void getPasteboardStringsForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(Vector<String>&&)>&&);
void getPasteboardBufferForType(IPC::Connection&, const String& pasteboardName, const String& pasteboardType, std::optional<WebCore::PageIdentifier>, CompletionHandler<void(SharedMemory::IPCHandle&&)>&&);
Modified: trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/WebPasteboardProxy.messages.in 2021-08-19 23:02:50 UTC (rev 281277)
@@ -43,7 +43,7 @@
# Pasteboard messages.
GetNumberOfFiles(String pasteboardName, std::optional<WebCore::PageIdentifier> pageID) -> (uint64_t numberOfFiles) Synchronous WantsConnection
GetPasteboardTypes(String pasteboardName, std::optional<WebCore::PageIdentifier> pageID) -> (Vector<String> types) Synchronous WantsConnection
- GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType, std::optional<WebCore::PageIdentifier> pageID) -> (Vector<String> pathnames, WebKit::SandboxExtension::HandleArray sandboxExtensions) Synchronous WantsConnection
+ GetPasteboardPathnamesForType(String pasteboardName, String pasteboardType, std::optional<WebCore::PageIdentifier> pageID) -> (Vector<String> pathnames, Vector<WebKit::SandboxExtension::Handle> sandboxExtensions) Synchronous WantsConnection
GetPasteboardStringForType(String pasteboardName, String pasteboardType, std::optional<WebCore::PageIdentifier> pageID) -> (String string) Synchronous WantsConnection
GetPasteboardStringsForType(String pasteboardName, String pasteboardType, std::optional<WebCore::PageIdentifier> pageID) -> (Vector<String> strings) Synchronous WantsConnection
GetPasteboardBufferForType(String pasteboardName, String pasteboardType, std::optional<WebCore::PageIdentifier> pageID) -> (WebKit::SharedMemory::IPCHandle handle) Synchronous WantsConnection
Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -757,10 +757,9 @@
parameters.injectedBundlePathExtensionHandle = WTFMove(*handle);
}
- parameters.additionalSandboxExtensionHandles.allocate(m_resolvedPaths.additionalWebProcessSandboxExtensionPaths.size());
- for (size_t i = 0, size = m_resolvedPaths.additionalWebProcessSandboxExtensionPaths.size(); i < size; ++i) {
- if (auto handle = SandboxExtension::createHandleWithoutResolvingPath(m_resolvedPaths.additionalWebProcessSandboxExtensionPaths[i], SandboxExtension::Type::ReadOnly))
- parameters.additionalSandboxExtensionHandles[i] = WTFMove(*handle);
+ for (auto& path : m_resolvedPaths.additionalWebProcessSandboxExtensionPaths) {
+ if (auto handle = SandboxExtension::createHandleWithoutResolvingPath(path, SandboxExtension::Type::ReadOnly))
+ parameters.additionalSandboxExtensionHandles.append(WTFMove(*handle));
}
#if PLATFORM(IOS_FAMILY)
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (281276 => 281277)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -9230,7 +9230,7 @@
capturedDragData.setFileNames(filenames);
WebKit::SandboxExtension::Handle sandboxExtensionHandle;
- WebKit::SandboxExtension::HandleArray sandboxExtensionForUpload;
+ Vector<WebKit::SandboxExtension::Handle> sandboxExtensionForUpload;
auto dragPasteboardName = WebCore::Pasteboard::nameOfDragPasteboard();
retainedSelf->_page->grantAccessToCurrentPasteboardData(dragPasteboardName);
retainedSelf->_page->createSandboxExtensionsIfNeeded(filenames, sandboxExtensionHandle, sandboxExtensionForUpload);
Modified: trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -32,7 +32,7 @@
namespace WebKit {
-MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions(Vector<String> ids, SandboxExtension::HandleArray&& handles)
+MediaDeviceSandboxExtensions::MediaDeviceSandboxExtensions(Vector<String> ids, Vector<SandboxExtension::Handle>&& handles)
: m_ids(ids)
, m_handles(WTFMove(handles))
{
@@ -42,7 +42,7 @@
void MediaDeviceSandboxExtensions::encode(IPC::Encoder& encoder) const
{
encoder << m_ids;
- m_handles.encode(encoder);
+ encoder << m_handles;
}
bool MediaDeviceSandboxExtensions::decode(IPC::Decoder& decoder, MediaDeviceSandboxExtensions& result)
@@ -50,7 +50,7 @@
if (!decoder.decode(result.m_ids))
return false;
- std::optional<SandboxExtension::HandleArray> handles;
+ std::optional<Vector<SandboxExtension::Handle>> handles;
decoder >> handles;
if (!handles)
return false;
Modified: trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/MediaStream/MediaDeviceSandboxExtensions.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -42,7 +42,7 @@
MediaDeviceSandboxExtensions(MediaDeviceSandboxExtensions&&) = default;
MediaDeviceSandboxExtensions& operator=(MediaDeviceSandboxExtensions&&) = default;
- MediaDeviceSandboxExtensions(Vector<String> ids, SandboxExtension::HandleArray&& handles);
+ MediaDeviceSandboxExtensions(Vector<String> ids, Vector<SandboxExtension::Handle>&& handles);
std::pair<String, RefPtr<SandboxExtension>> operator[](size_t i);
size_t size() const;
@@ -52,7 +52,7 @@
private:
Vector<String> m_ids;
- SandboxExtension::HandleArray m_handles;
+ Vector<SandboxExtension::Handle> m_handles;
};
} // namespace WebKit
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -151,7 +151,7 @@
void WebPlatformStrategies::getPathnamesForType(Vector<String>& pathnames, const String& pasteboardType, const String& pasteboardName, const PasteboardContext* context)
{
- SandboxExtension::HandleArray sandboxExtensionsHandleArray;
+ Vector<SandboxExtension::Handle> sandboxExtensionsHandleArray;
WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPasteboardProxy::GetPasteboardPathnamesForType(pasteboardName, pasteboardType, pageIdentifier(context)),
Messages::WebPasteboardProxy::GetPasteboardPathnamesForType::Reply(pathnames, sandboxExtensionsHandleArray), 0);
ASSERT(pathnames.size() == sandboxExtensionsHandleArray.size());
Modified: trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -412,7 +412,7 @@
postLayoutData.baseWritingDirection = frame.editor().baseWritingDirectionForSelectionStart();
}
-void WebPage::consumeNetworkExtensionSandboxExtensions(const SandboxExtension::HandleArray& networkExtensionsHandles)
+void WebPage::consumeNetworkExtensionSandboxExtensions(const Vector<SandboxExtension::Handle>& networkExtensionsHandles)
{
#if ENABLE(CONTENT_FILTERING)
SandboxExtension::consumePermanently(networkExtensionsHandles);
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-08-19 23:02:50 UTC (rev 281277)
@@ -2963,7 +2963,7 @@
}
}
-void WebPage::mouseEvent(const WebMouseEvent& mouseEvent, std::optional<SandboxExtension::HandleArray>&& sandboxExtensions)
+void WebPage::mouseEvent(const WebMouseEvent& mouseEvent, std::optional<Vector<SandboxExtension::Handle>>&& sandboxExtensions)
{
SetForScope<bool> userIsInteractingChange { m_userIsInteracting, true };
@@ -3506,7 +3506,7 @@
pluginView->setLayerHostingMode(m_layerHostingMode);
}
-void WebPage::didReceivePolicyDecision(FrameIdentifier frameID, uint64_t listenerID, PolicyDecision&& policyDecision, const SandboxExtension::HandleArray& networkExtensionsHandles)
+void WebPage::didReceivePolicyDecision(FrameIdentifier frameID, uint64_t listenerID, PolicyDecision&& policyDecision, const Vector<SandboxExtension::Handle>& networkExtensionsHandles)
{
consumeNetworkExtensionSandboxExtensions(networkExtensionsHandles);
@@ -4357,7 +4357,7 @@
ASSERT_NOT_REACHED();
}
#else
-void WebPage::performDragControllerAction(DragControllerAction action, const WebCore::DragData& dragData, SandboxExtension::Handle&& sandboxExtensionHandle, SandboxExtension::HandleArray&& sandboxExtensionsHandleArray)
+void WebPage::performDragControllerAction(DragControllerAction action, const WebCore::DragData& dragData, SandboxExtension::Handle&& sandboxExtensionHandle, Vector<SandboxExtension::Handle>&& sandboxExtensionsHandleArray)
{
if (!m_page) {
send(Messages::WebPageProxy::DidPerformDragControllerAction(std::nullopt, DragHandlingMethod::None, false, 0, { }, { }));
@@ -4696,7 +4696,7 @@
}
#if ENABLE(SANDBOX_EXTENSIONS)
-void WebPage::extendSandboxForFilesFromOpenPanel(SandboxExtension::HandleArray&& handles)
+void WebPage::extendSandboxForFilesFromOpenPanel(Vector<SandboxExtension::Handle>&& handles)
{
bool result = SandboxExtension::consumePermanently(handles);
if (!result) {
@@ -7600,7 +7600,7 @@
}
#endif
-Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(SandboxExtension::HandleArray&& sandboxExtensions)
+Vector<RefPtr<SandboxExtension>> WebPage::consumeSandboxExtensions(Vector<SandboxExtension::Handle>&& sandboxExtensions)
{
Vector<RefPtr<SandboxExtension>> dragSandboxExtensions;
for (auto& sandboxExtension : sandboxExtensions) {
@@ -7689,7 +7689,7 @@
#endif
#if !PLATFORM(COCOA)
-void WebPage::consumeNetworkExtensionSandboxExtensions(const SandboxExtension::HandleArray&)
+void WebPage::consumeNetworkExtensionSandboxExtensions(const Vector<SandboxExtension::Handle>&)
{
}
#endif
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.h (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -973,7 +973,7 @@
#endif
#if ENABLE(DRAG_SUPPORT) && !PLATFORM(GTK)
- void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, SandboxExtension::HandleArray&&);
+ void performDragControllerAction(DragControllerAction, const WebCore::DragData&, SandboxExtension::Handle&&, Vector<SandboxExtension::Handle>&&);
#endif
#if ENABLE(DRAG_SUPPORT)
@@ -1606,7 +1606,7 @@
void setNeedsFontAttributes(bool);
- void mouseEvent(const WebMouseEvent&, std::optional<SandboxExtension::HandleArray>&& sandboxExtensions);
+ void mouseEvent(const WebMouseEvent&, std::optional<Vector<SandboxExtension::Handle>>&& sandboxExtensions);
void keyEvent(const WebKeyboardEvent&);
#if ENABLE(IOS_TOUCH_EVENTS)
@@ -1690,7 +1690,7 @@
void clearServiceWorkerEntitlementOverride(CompletionHandler<void()>&& completionHandler) { completionHandler(); }
#endif
- void didReceivePolicyDecision(WebCore::FrameIdentifier, uint64_t listenerID, PolicyDecision&&, const SandboxExtension::HandleArray&);
+ void didReceivePolicyDecision(WebCore::FrameIdentifier, uint64_t listenerID, PolicyDecision&&, const Vector<SandboxExtension::Handle>&);
void continueWillSubmitForm(WebCore::FrameIdentifier, uint64_t listenerID);
void setUserAgent(const String&);
void setCustomTextEncodingName(const String&);
@@ -1758,7 +1758,7 @@
#endif
#if ENABLE(SANDBOX_EXTENSIONS)
- void extendSandboxForFilesFromOpenPanel(SandboxExtension::HandleArray&&);
+ void extendSandboxForFilesFromOpenPanel(Vector<SandboxExtension::Handle>&&);
#endif
void didReceiveGeolocationPermissionDecision(GeolocationIdentifier, const String& authorizationToken);
@@ -1910,12 +1910,12 @@
void platformDidScalePage();
- Vector<RefPtr<SandboxExtension>> consumeSandboxExtensions(SandboxExtension::HandleArray&&);
+ Vector<RefPtr<SandboxExtension>> consumeSandboxExtensions(Vector<SandboxExtension::Handle>&&);
void revokeSandboxExtensions(Vector<RefPtr<SandboxExtension>>& sandboxExtensions);
void setSelectionRange(const WebCore::IntPoint&, WebCore::TextGranularity, bool);
- void consumeNetworkExtensionSandboxExtensions(const SandboxExtension::HandleArray&);
+ void consumeNetworkExtensionSandboxExtensions(const Vector<SandboxExtension::Handle>&);
void platformIsPlayingMediaDidChange();
Modified: trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2021-08-19 23:02:50 UTC (rev 281277)
@@ -46,7 +46,7 @@
ExecuteEditCommandWithCallback(String name, String argument) -> () Async
KeyEvent(WebKit::WebKeyboardEvent event)
- MouseEvent(WebKit::WebMouseEvent event, std::optional<WebKit::SandboxExtension::HandleArray> sandboxExtensions)
+ MouseEvent(WebKit::WebMouseEvent event, std::optional<Vector<WebKit::SandboxExtension::Handle>> sandboxExtensions)
#if PLATFORM(IOS_FAMILY)
SetViewportConfigurationViewLayoutSize(WebCore::FloatSize size, double scaleFactor, double minimumEffectiveDeviceWidth)
SetMaximumUnobscuredSize(WebCore::FloatSize size)
@@ -194,7 +194,7 @@
UpdateWebsitePolicies(struct WebKit::WebsitePoliciesData websitePolicies)
NotifyUserScripts()
- DidReceivePolicyDecision(WebCore::FrameIdentifier frameID, uint64_t listenerID, struct WebKit::PolicyDecision policyDecision, WebKit::SandboxExtension::HandleArray networkExtensionsSandboxExtensions)
+ DidReceivePolicyDecision(WebCore::FrameIdentifier frameID, uint64_t listenerID, struct WebKit::PolicyDecision policyDecision, Vector<WebKit::SandboxExtension::Handle> networkExtensionsSandboxExtensions)
ContinueWillSubmitForm(WebCore::FrameIdentifier frameID, uint64_t listenerID)
@@ -316,7 +316,7 @@
PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::IntPoint clientPosition, WebCore::IntPoint globalPosition, OptionSet<WebCore::DragOperation> draggingSourceOperationMask, WebCore::SelectionData selection, OptionSet<WebCore::DragApplicationFlags> flags)
#endif
#if !PLATFORM(GTK) && ENABLE(DRAG_SUPPORT)
- PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData, WebKit::SandboxExtension::Handle sandboxExtensionHandle, WebKit::SandboxExtension::HandleArray sandboxExtensionsForUpload)
+ PerformDragControllerAction(enum:uint8_t WebKit::DragControllerAction action, WebCore::DragData dragData, WebKit::SandboxExtension::Handle sandboxExtensionHandle, Vector<WebKit::SandboxExtension::Handle> sandboxExtensionsForUpload)
#endif
#if ENABLE(DRAG_SUPPORT)
DidStartDrag()
@@ -353,7 +353,7 @@
DidChooseFilesForOpenPanel(Vector<String> fileURLs, Vector<String> replacementURLs)
DidCancelForOpenPanel()
#if ENABLE(SANDBOX_EXTENSIONS)
- ExtendSandboxForFilesFromOpenPanel(WebKit::SandboxExtension::HandleArray sandboxExtensions)
+ ExtendSandboxForFilesFromOpenPanel(Vector<WebKit::SandboxExtension::Handle> sandboxExtensions)
#endif
# Spelling and grammar.
Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebProcess.h 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h 2021-08-19 23:02:50 UTC (rev 281277)
@@ -349,10 +349,10 @@
#if ENABLE(REMOTE_INSPECTOR)
void enableRemoteWebInspector();
#endif
- void unblockServicesRequiredByAccessibility(const SandboxExtension::HandleArray&);
+ void unblockServicesRequiredByAccessibility(const Vector<SandboxExtension::Handle>&);
#if ENABLE(CFPREFS_DIRECT_MODE)
void notifyPreferencesChanged(const String& domain, const String& key, const std::optional<String>& encodedValue);
- void unblockPreferenceService(SandboxExtension::HandleArray&&);
+ void unblockPreferenceService(Vector<SandboxExtension::Handle>&&);
#endif
void powerSourceDidChange(bool);
#endif
Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in 2021-08-19 23:02:50 UTC (rev 281277)
@@ -172,10 +172,10 @@
SwitchFromStaticFontRegistryToUserFontRegistry(WebKit::SandboxExtension::Handle fontMachExtensionHandle)
#if PLATFORM(COCOA)
- UnblockServicesRequiredByAccessibility(WebKit::SandboxExtension::HandleArray handleArray)
+ UnblockServicesRequiredByAccessibility(Vector<WebKit::SandboxExtension::Handle> handleArray)
#if ENABLE(CFPREFS_DIRECT_MODE)
NotifyPreferencesChanged(String domain, String key, std::optional<String> encodedValue)
- UnblockPreferenceService(WebKit::SandboxExtension::HandleArray handleArray)
+ UnblockPreferenceService(Vector<WebKit::SandboxExtension::Handle> handleArray)
#endif
PowerSourceDidChange(bool hasAC)
#endif
Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (281276 => 281277)
--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-08-19 22:48:25 UTC (rev 281276)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2021-08-19 23:02:50 UTC (rev 281277)
@@ -1195,7 +1195,7 @@
dispatchSimulatedNotificationsForPreferenceChange(key);
}
-void WebProcess::unblockPreferenceService(SandboxExtension::HandleArray&& handleArray)
+void WebProcess::unblockPreferenceService(Vector<SandboxExtension::Handle>&& handleArray)
{
SandboxExtension::consumePermanently(handleArray);
_CFPrefsSetDirectModeEnabled(false);
@@ -1255,7 +1255,7 @@
}
#endif
-void WebProcess::unblockServicesRequiredByAccessibility(const SandboxExtension::HandleArray& handleArray)
+void WebProcess::unblockServicesRequiredByAccessibility(const Vector<SandboxExtension::Handle>& handleArray)
{
#if PLATFORM(IOS_FAMILY)
bool consumed = SandboxExtension::consumePermanently(handleArray);