BlobRegistry no longer needs SessionIDs
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2019 22:30:39 +0000 (22:30 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Sep 2019 22:30:39 +0000 (22:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201936

Reviewed by Geoffrey Garen.

BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.

Source/WebCore:

* Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::getFile):
* Modules/entriesapi/DOMFileSystem.h:
* Modules/entriesapi/FileSystemFileEntry.cpp:
(WebCore::FileSystemFileEntry::file):
* Modules/entriesapi/FileSystemFileEntry.h:
* Modules/entriesapi/FileSystemFileEntry.idl:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::fromFormData):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::blobFromData):
(WebCore::resolveWithTypeAndData):
(WebCore::FetchBodyConsumer::resolve):
(WebCore::FetchBodyConsumer::takeAsBlob):
* Modules/fetch/FetchBodyConsumer.h:
* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::blob):
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::~FetchLoader):
(WebCore::FetchLoader::startLoadingBlobURL):
* Modules/fetch/FetchLoader.h:
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::putOrAddOnServer):
* Modules/mediarecorder/MediaRecorder.cpp:
(WebCore::MediaRecorder::createRecordingDataBlob):
* Modules/mediasource/MediaSourceRegistry.cpp:
(WebCore::MediaSourceRegistry::unregisterURL):
* Modules/mediasource/MediaSourceRegistry.h:
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::didReceiveRawData):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::didReceiveBinaryData):
* Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readFile):
(WebCore::CloneDeserializer::readTerminal):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
* bindings/js/SerializedScriptValue.h:
* dom/DataTransfer.cpp:
(WebCore::DataTransfer::DataTransfer):
(WebCore::DataTransfer::createForCopyAndPaste):
(WebCore::DataTransfer::filesFromPasteboardAndItemList const):
(WebCore::DataTransfer::createForInputEvent):
(WebCore::DataTransfer::createForDrag):
(WebCore::DataTransfer::createForDragStartEvent):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForUpdatingDropTarget):
* dom/DataTransfer.h:
* editing/ReplaceRangeWithTextCommand.cpp:
(WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
* editing/SpellingCorrectionCommand.cpp:
(WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::inputEventDataTransfer const):
* editing/WebCorePasteboardFileReader.cpp:
(WebCore::WebCorePasteboardFileReader::readFilename):
(WebCore::WebCorePasteboardFileReader::readBuffer):
* editing/WebCorePasteboardFileReader.h:
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::createFragmentForImageAttachment):
(WebCore::replaceRichContentWithAttachments):
(WebCore::createFragmentAndAddResources):
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readImage):
(WebCore::attachmentForFilePath):
(WebCore::attachmentForData):
* editing/markup.cpp:
(WebCore::restoreAttachmentElementsInFragment):
* fileapi/Blob.cpp:
(WebCore::BlobURLRegistry::registerURL):
(WebCore::BlobURLRegistry::unregisterURL):
(WebCore::Blob::Blob):
(WebCore::Blob::~Blob):
* fileapi/Blob.h:
(WebCore::Blob::create):
(WebCore::Blob::deserialize):
(WebCore::Blob::slice const):
* fileapi/Blob.idl:
* fileapi/File.cpp:
(WebCore::File::createWithRelativePath):
(WebCore::File::create):
(WebCore::File::File):
* fileapi/File.h:
* fileapi/File.idl:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::~FileReaderLoader):
(WebCore::FileReaderLoader::start):
* fileapi/FileReaderLoader.h:
* fileapi/ThreadableBlobRegistry.cpp:
(WebCore::ThreadableBlobRegistry::registerFileBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURL):
(WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
(WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
(WebCore::ThreadableBlobRegistry::unregisterBlobURL):
* fileapi/ThreadableBlobRegistry.h:
* html/FileInputType.cpp:
(WebCore::FileInputType::appendFormData const):
(WebCore::FileInputType::filesChosen):
* html/FileListCreator.cpp:
(WebCore::appendDirectoryFiles):
(WebCore::FileListCreator::FileListCreator):
(WebCore::FileListCreator::createFileList):
* html/FileListCreator.h:
(WebCore::FileListCreator::create):
* html/HTMLAttachmentElement.cpp:
(WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::toBlob):
* html/PublicURLManager.cpp:
(WebCore::PublicURLManager::revoke):
(WebCore::PublicURLManager::stop):
* html/URLRegistry.h:
* loader/PolicyChecker.cpp:
(WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
* page/EventHandler.cpp:
(WebCore::EventHandler::handleDrag):
* platform/network/BlobRegistry.h:
* testing/Internals.cpp:
(WebCore::Internals::createFile):
* testing/ServiceWorkerInternals.cpp:
(WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
* workers/service/context/ServiceWorkerFetch.cpp:
(WebCore::ServiceWorkerFetch::dispatchFetchEvent):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::createResponseBlob):

Source/WebKit:

* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/FileAPI/BlobRegistryProxy.h:

Source/WebKitLegacy/mac:

* WebCoreSupport/WebPlatformStrategies.mm:

Source/WebKitLegacy/win:

* WebCoreSupport/WebPlatformStrategies.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250061 268f45cc-cd09-0410-ab3c-d52691b4dbfc

65 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp
Source/WebCore/Modules/entriesapi/DOMFileSystem.h
Source/WebCore/Modules/entriesapi/FileSystemFileEntry.cpp
Source/WebCore/Modules/entriesapi/FileSystemFileEntry.h
Source/WebCore/Modules/entriesapi/FileSystemFileEntry.idl
Source/WebCore/Modules/fetch/FetchBody.cpp
Source/WebCore/Modules/fetch/FetchBody.h
Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
Source/WebCore/Modules/fetch/FetchBodyConsumer.h
Source/WebCore/Modules/fetch/FetchBodyOwner.cpp
Source/WebCore/Modules/fetch/FetchLoader.cpp
Source/WebCore/Modules/fetch/FetchLoader.h
Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
Source/WebCore/Modules/mediarecorder/MediaRecorder.cpp
Source/WebCore/Modules/mediasource/MediaSourceRegistry.cpp
Source/WebCore/Modules/mediasource/MediaSourceRegistry.h
Source/WebCore/Modules/mediastream/RTCDataChannel.cpp
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp
Source/WebCore/bindings/js/SerializedScriptValue.cpp
Source/WebCore/bindings/js/SerializedScriptValue.h
Source/WebCore/dom/DataTransfer.cpp
Source/WebCore/dom/DataTransfer.h
Source/WebCore/editing/ReplaceRangeWithTextCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/SpellingCorrectionCommand.cpp
Source/WebCore/editing/TypingCommand.cpp
Source/WebCore/editing/WebCorePasteboardFileReader.cpp
Source/WebCore/editing/WebCorePasteboardFileReader.h
Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
Source/WebCore/editing/gtk/EditorGtk.cpp
Source/WebCore/editing/markup.cpp
Source/WebCore/fileapi/Blob.cpp
Source/WebCore/fileapi/Blob.h
Source/WebCore/fileapi/Blob.idl
Source/WebCore/fileapi/File.cpp
Source/WebCore/fileapi/File.h
Source/WebCore/fileapi/File.idl
Source/WebCore/fileapi/FileReaderLoader.cpp
Source/WebCore/fileapi/FileReaderLoader.h
Source/WebCore/fileapi/ThreadableBlobRegistry.cpp
Source/WebCore/fileapi/ThreadableBlobRegistry.h
Source/WebCore/html/FileInputType.cpp
Source/WebCore/html/FileListCreator.cpp
Source/WebCore/html/FileListCreator.h
Source/WebCore/html/HTMLAttachmentElement.cpp
Source/WebCore/html/HTMLCanvasElement.cpp
Source/WebCore/html/PublicURLManager.cpp
Source/WebCore/html/URLRegistry.h
Source/WebCore/loader/PolicyChecker.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/platform/network/BlobRegistry.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/ServiceWorkerInternals.cpp
Source/WebCore/workers/service/context/ServiceWorkerFetch.cpp
Source/WebCore/xml/XMLHttpRequest.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp

index 56d0c92..bf9034c 100644 (file)
@@ -1,3 +1,143 @@
+2019-09-18  Chris Dumez  <cdumez@apple.com>
+
+        BlobRegistry no longer needs SessionIDs
+        https://bugs.webkit.org/show_bug.cgi?id=201936
+
+        Reviewed by Geoffrey Garen.
+
+        BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
+
+        * Modules/entriesapi/DOMFileSystem.cpp:
+        (WebCore::DOMFileSystem::getFile):
+        * Modules/entriesapi/DOMFileSystem.h:
+        * Modules/entriesapi/FileSystemFileEntry.cpp:
+        (WebCore::FileSystemFileEntry::file):
+        * Modules/entriesapi/FileSystemFileEntry.h:
+        * Modules/entriesapi/FileSystemFileEntry.idl:
+        * Modules/fetch/FetchBody.cpp:
+        (WebCore::FetchBody::fromFormData):
+        * Modules/fetch/FetchBody.h:
+        * Modules/fetch/FetchBodyConsumer.cpp:
+        (WebCore::blobFromData):
+        (WebCore::resolveWithTypeAndData):
+        (WebCore::FetchBodyConsumer::resolve):
+        (WebCore::FetchBodyConsumer::takeAsBlob):
+        * Modules/fetch/FetchBodyConsumer.h:
+        * Modules/fetch/FetchBodyOwner.cpp:
+        (WebCore::FetchBodyOwner::blob):
+        * Modules/fetch/FetchLoader.cpp:
+        (WebCore::FetchLoader::~FetchLoader):
+        (WebCore::FetchLoader::startLoadingBlobURL):
+        * Modules/fetch/FetchLoader.h:
+        * Modules/indexeddb/IDBTransaction.cpp:
+        (WebCore::IDBTransaction::putOrAddOnServer):
+        * Modules/mediarecorder/MediaRecorder.cpp:
+        (WebCore::MediaRecorder::createRecordingDataBlob):
+        * Modules/mediasource/MediaSourceRegistry.cpp:
+        (WebCore::MediaSourceRegistry::unregisterURL):
+        * Modules/mediasource/MediaSourceRegistry.h:
+        * Modules/mediastream/RTCDataChannel.cpp:
+        (WebCore::RTCDataChannel::didReceiveRawData):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::WebSocket::didReceiveBinaryData):
+        * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
+        (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneDeserializer::readFile):
+        (WebCore::CloneDeserializer::readTerminal):
+        (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
+        (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
+        * bindings/js/SerializedScriptValue.h:
+        * dom/DataTransfer.cpp:
+        (WebCore::DataTransfer::DataTransfer):
+        (WebCore::DataTransfer::createForCopyAndPaste):
+        (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
+        (WebCore::DataTransfer::createForInputEvent):
+        (WebCore::DataTransfer::createForDrag):
+        (WebCore::DataTransfer::createForDragStartEvent):
+        (WebCore::DataTransfer::createForDrop):
+        (WebCore::DataTransfer::createForUpdatingDropTarget):
+        * dom/DataTransfer.h:
+        * editing/ReplaceRangeWithTextCommand.cpp:
+        (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
+        * editing/ReplaceSelectionCommand.cpp:
+        (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
+        * editing/SpellingCorrectionCommand.cpp:
+        (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
+        * editing/TypingCommand.cpp:
+        (WebCore::TypingCommand::inputEventDataTransfer const):
+        * editing/WebCorePasteboardFileReader.cpp:
+        (WebCore::WebCorePasteboardFileReader::readFilename):
+        (WebCore::WebCorePasteboardFileReader::readBuffer):
+        * editing/WebCorePasteboardFileReader.h:
+        * editing/cocoa/WebContentReaderCocoa.mm:
+        (WebCore::createFragmentForImageAttachment):
+        (WebCore::replaceRichContentWithAttachments):
+        (WebCore::createFragmentAndAddResources):
+        (WebCore::sanitizeMarkupWithArchive):
+        (WebCore::WebContentReader::readImage):
+        (WebCore::attachmentForFilePath):
+        (WebCore::attachmentForData):
+        * editing/markup.cpp:
+        (WebCore::restoreAttachmentElementsInFragment):
+        * fileapi/Blob.cpp:
+        (WebCore::BlobURLRegistry::registerURL):
+        (WebCore::BlobURLRegistry::unregisterURL):
+        (WebCore::Blob::Blob):
+        (WebCore::Blob::~Blob):
+        * fileapi/Blob.h:
+        (WebCore::Blob::create):
+        (WebCore::Blob::deserialize):
+        (WebCore::Blob::slice const):
+        * fileapi/Blob.idl:
+        * fileapi/File.cpp:
+        (WebCore::File::createWithRelativePath):
+        (WebCore::File::create):
+        (WebCore::File::File):
+        * fileapi/File.h:
+        * fileapi/File.idl:
+        * fileapi/FileReaderLoader.cpp:
+        (WebCore::FileReaderLoader::~FileReaderLoader):
+        (WebCore::FileReaderLoader::start):
+        * fileapi/FileReaderLoader.h:
+        * fileapi/ThreadableBlobRegistry.cpp:
+        (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
+        (WebCore::ThreadableBlobRegistry::registerBlobURL):
+        (WebCore::ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked):
+        (WebCore::ThreadableBlobRegistry::registerBlobURLForSlice):
+        (WebCore::ThreadableBlobRegistry::unregisterBlobURL):
+        * fileapi/ThreadableBlobRegistry.h:
+        * html/FileInputType.cpp:
+        (WebCore::FileInputType::appendFormData const):
+        (WebCore::FileInputType::filesChosen):
+        * html/FileListCreator.cpp:
+        (WebCore::appendDirectoryFiles):
+        (WebCore::FileListCreator::FileListCreator):
+        (WebCore::FileListCreator::createFileList):
+        * html/FileListCreator.h:
+        (WebCore::FileListCreator::create):
+        * html/HTMLAttachmentElement.cpp:
+        (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::toBlob):
+        * html/PublicURLManager.cpp:
+        (WebCore::PublicURLManager::revoke):
+        (WebCore::PublicURLManager::stop):
+        * html/URLRegistry.h:
+        * loader/PolicyChecker.cpp:
+        (WebCore::PolicyChecker::extendBlobURLLifetimeIfNecessary const):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::handleDrag):
+        * platform/network/BlobRegistry.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::createFile):
+        * testing/ServiceWorkerInternals.cpp:
+        (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
+        * workers/service/context/ServiceWorkerFetch.cpp:
+        (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
+        * xml/XMLHttpRequest.cpp:
+        (WebCore::XMLHttpRequest::createResponseBlob):
+
 2019-09-18  Yusuke Suzuki  <ysuzuki@apple.com>
 
         Make all ScriptWrappable IsoHeap-ed
index 9f4a10b..161ae03 100644 (file)
@@ -333,17 +333,17 @@ void DOMFileSystem::getEntry(ScriptExecutionContext& context, FileSystemDirector
     });
 }
 
-void DOMFileSystem::getFile(ScriptExecutionContext& context, FileSystemFileEntry& fileEntry, GetFileCallback&& completionCallback)
+void DOMFileSystem::getFile(FileSystemFileEntry& fileEntry, GetFileCallback&& completionCallback)
 {
     auto virtualPath = fileEntry.virtualPath();
     auto fullPath = evaluatePath(virtualPath);
-    m_workQueue->dispatch([context = makeRef(context), fullPath = crossThreadCopy(fullPath), virtualPath = crossThreadCopy(virtualPath), completionCallback = WTFMove(completionCallback)]() mutable {
+    m_workQueue->dispatch([fullPath = crossThreadCopy(fullPath), virtualPath = crossThreadCopy(virtualPath), completionCallback = WTFMove(completionCallback)]() mutable {
         auto validatedVirtualPath = validatePathIsExpectedType(fullPath, WTFMove(virtualPath), FileMetadata::Type::File);
-        callOnMainThread([context = WTFMove(context), fullPath = crossThreadCopy(fullPath), validatedVirtualPath = crossThreadCopy(validatedVirtualPath), completionCallback = WTFMove(completionCallback)]() mutable {
+        callOnMainThread([fullPath = crossThreadCopy(fullPath), validatedVirtualPath = crossThreadCopy(validatedVirtualPath), completionCallback = WTFMove(completionCallback)]() mutable {
             if (validatedVirtualPath.hasException())
                 completionCallback(validatedVirtualPath.releaseException());
             else
-                completionCallback(File::create(context->sessionID(), fullPath));
+                completionCallback(File::create(fullPath));
         });
     });
 }
index 3836b87..74a3ce6 100644 (file)
@@ -63,7 +63,7 @@ public:
     void getEntry(ScriptExecutionContext&, FileSystemDirectoryEntry&, const String& virtualPath, const FileSystemDirectoryEntry::Flags&, GetEntryCallback&&);
 
     using GetFileCallback = WTF::Function<void(ExceptionOr<Ref<File>>&&)>;
-    void getFile(ScriptExecutionContext&, FileSystemFileEntry&, GetFileCallback&&);
+    void getFile(FileSystemFileEntry&, GetFileCallback&&);
 
 private:
     explicit DOMFileSystem(Ref<File>&&);
index 8829043..e8c9ef3 100644 (file)
@@ -38,9 +38,9 @@ FileSystemFileEntry::FileSystemFileEntry(ScriptExecutionContext& context, DOMFil
 {
 }
 
-void FileSystemFileEntry::file(ScriptExecutionContext& context, Ref<FileCallback>&& successCallback, RefPtr<ErrorCallback>&& errorCallback)
+void FileSystemFileEntry::file(Ref<FileCallback>&& successCallback, RefPtr<ErrorCallback>&& errorCallback)
 {
-    filesystem().getFile(context, *this, [successCallback = WTFMove(successCallback), errorCallback = WTFMove(errorCallback)](auto&& result) {
+    filesystem().getFile(*this, [successCallback = WTFMove(successCallback), errorCallback = WTFMove(errorCallback)](auto&& result) {
         if (result.hasException()) {
             if (errorCallback)
                 errorCallback->handleEvent(DOMException::create(result.releaseException()));
index ab96e02..ea79e3b 100644 (file)
@@ -40,7 +40,7 @@ public:
         return adoptRef(*new FileSystemFileEntry(context, filesystem, virtualPath));
     }
 
-    void file(ScriptExecutionContext&, Ref<FileCallback>&&, RefPtr<ErrorCallback>&& = nullptr);
+    void file(Ref<FileCallback>&&, RefPtr<ErrorCallback>&& = nullptr);
 
 private:
     bool isFile() const final { return true; }
index dad97b9..2d7352b 100644 (file)
@@ -26,5 +26,5 @@
 [
     EnabledAtRuntime=DirectoryUpload,
 ] interface FileSystemFileEntry : FileSystemEntry {
-    [CallWith=ScriptExecutionContext] void file(FileCallback successCallback, optional ErrorCallback? errorCallback);
+    void file(FileCallback successCallback, optional ErrorCallback? errorCallback);
 };
index ad26b34..291854a 100644 (file)
@@ -75,7 +75,7 @@ ExceptionOr<FetchBody> FetchBody::extract(Init&& value, String& contentType)
     });
 }
 
-Optional<FetchBody> FetchBody::fromFormData(PAL::SessionID sessionID, FormData& formData)
+Optional<FetchBody> FetchBody::fromFormData(FormData& formData)
 {
     ASSERT(!formData.isEmpty());
 
@@ -88,7 +88,7 @@ Optional<FetchBody> FetchBody::fromFormData(PAL::SessionID sessionID, FormData&
     auto url = formData.asBlobURL();
     if (!url.isNull()) {
         // FIXME: Properly set mime type and size of the blob.
-        Ref<const Blob> blob = Blob::deserialize(sessionID, url, { }, { }, { });
+        Ref<const Blob> blob = Blob::deserialize(url, { }, { }, { });
         return FetchBody { WTFMove(blob) };
     }
 
index b27e0a5..c3f96ff 100644 (file)
@@ -59,7 +59,7 @@ public:
     static ExceptionOr<FetchBody> extract(Init&&, String&);
     FetchBody() = default;
 
-    WEBCORE_EXPORT static Optional<FetchBody> fromFormData(PAL::SessionID, FormData&);
+    WEBCORE_EXPORT static Optional<FetchBody> fromFormData(FormData&);
 
     void loadingFailed(const Exception&);
     void loadingSucceeded();
index db26eee..22d4372 100644 (file)
 
 namespace WebCore {
 
-static inline Ref<Blob> blobFromData(PAL::SessionID sessionID, const unsigned char* data, unsigned length, const String& contentType)
+static inline Ref<Blob> blobFromData(const unsigned char* data, unsigned length, const String& contentType)
 {
     Vector<uint8_t> value(length);
     memcpy(value.data(), data, length);
-    return Blob::create(sessionID, WTFMove(value), contentType);
+    return Blob::create(WTFMove(value), contentType);
 }
 
 static inline bool shouldPrependBOM(const unsigned char* data, unsigned length)
@@ -64,8 +64,8 @@ static void resolveWithTypeAndData(Ref<DeferredPromise>&& promise, FetchBodyCons
         fulfillPromiseWithArrayBuffer(WTFMove(promise), data, length);
         return;
     case FetchBodyConsumer::Type::Blob:
-        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([&data, &length, &contentType](auto& context) {
-            return blobFromData(context.sessionID(), data, length, contentType);
+        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([&data, &length, &contentType](auto&) {
+            return blobFromData(data, length, contentType);
         });
         return;
     case FetchBodyConsumer::Type::JSON:
@@ -132,8 +132,8 @@ void FetchBodyConsumer::resolve(Ref<DeferredPromise>&& promise, ReadableStream*
         fulfillPromiseWithArrayBuffer(WTFMove(promise), takeAsArrayBuffer().get());
         return;
     case Type::Blob:
-        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([this](auto& context) {
-            return takeAsBlob(context.sessionID());
+        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([this](auto&) {
+            return takeAsBlob();
         });
         return;
     case Type::JSON:
@@ -181,13 +181,13 @@ RefPtr<JSC::ArrayBuffer> FetchBodyConsumer::takeAsArrayBuffer()
     return arrayBuffer;
 }
 
-Ref<Blob> FetchBodyConsumer::takeAsBlob(PAL::SessionID sessionID)
+Ref<Blob> FetchBodyConsumer::takeAsBlob()
 {
     if (!m_buffer)
-        return Blob::create(sessionID, Vector<uint8_t>(), m_contentType);
+        return Blob::create(Vector<uint8_t>(), m_contentType);
 
     // FIXME: We should try to move m_buffer to Blob without doing extra copy.
-    return blobFromData(sessionID, reinterpret_cast<const unsigned char*>(m_buffer->data()), m_buffer->size(), m_contentType);
+    return blobFromData(reinterpret_cast<const unsigned char*>(m_buffer->data()), m_buffer->size(), m_contentType);
 }
 
 String FetchBodyConsumer::takeAsText()
index 407acb5..f23c1a9 100644 (file)
@@ -75,7 +75,7 @@ public:
     void setAsLoading() { m_isLoading = true; }
 
 private:
-    Ref<Blob> takeAsBlob(PAL::SessionID);
+    Ref<Blob> takeAsBlob();
 
     Type m_type;
     String m_contentType;
index 539d18a..3b9e1ba 100644 (file)
@@ -124,8 +124,8 @@ void FetchBodyOwner::blob(Ref<DeferredPromise>&& promise)
     }
 
     if (isBodyNullOrOpaque()) {
-        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([this](auto& context) {
-            return Blob::create(context.sessionID(), Vector<uint8_t> { }, Blob::normalizedContentType(extractMIMETypeFromMediaType(m_contentType)));
+        promise->resolveCallbackValueWithNewlyCreated<IDLInterface<Blob>>([this](auto&) {
+            return Blob::create(Vector<uint8_t> { }, Blob::normalizedContentType(extractMIMETypeFromMediaType(m_contentType)));
         });
         return;
     }
index d8db90c..c0dbf5f 100644 (file)
@@ -48,7 +48,7 @@ namespace WebCore {
 FetchLoader::~FetchLoader()
 {
     if (!m_urlForReading.isEmpty())
-        ThreadableBlobRegistry::unregisterBlobURL(*m_sessionID, m_urlForReading);
+        ThreadableBlobRegistry::unregisterBlobURL(m_urlForReading);
 }
 
 void FetchLoader::start(ScriptExecutionContext& context, const Blob& blob)
@@ -64,8 +64,7 @@ void FetchLoader::startLoadingBlobURL(ScriptExecutionContext& context, const URL
         return;
     }
 
-    m_sessionID = context.sessionID();
-    ThreadableBlobRegistry::registerBlobURL(*m_sessionID, context.securityOrigin(), m_urlForReading, blobURL);
+    ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), m_urlForReading, blobURL);
 
     ResourceRequest request(m_urlForReading);
     request.setInitiatorIdentifier(context.resourceRequestIdentifier());
index b6c6508..4011b37 100644 (file)
@@ -67,7 +67,6 @@ private:
     FetchBodyConsumer* m_consumer;
     bool m_isStarted { false };
     URL m_urlForReading;
-    Optional<PAL::SessionID> m_sessionID;
 };
 
 } // namespace WebCore
index 63493b3..4b8fe73 100644 (file)
@@ -1282,7 +1282,7 @@ void IDBTransaction::putOrAddOnServer(IDBClient::TransactionOperation& operation
     // workers currently write blobs to disk synchronously.
     // FIXME: https://bugs.webkit.org/show_bug.cgi?id=157958 - Make this asynchronous after refactoring allows it.
     if (!isMainThread()) {
-        auto idbValue = value->writeBlobsToDiskForIndexedDBSynchronously(scriptExecutionContext()->sessionID());
+        auto idbValue = value->writeBlobsToDiskForIndexedDBSynchronously();
         if (idbValue.data().data())
             m_database->connectionProxy().putOrAdd(operation, key.get(), idbValue, overwriteMode);
         else {
@@ -1301,7 +1301,7 @@ void IDBTransaction::putOrAddOnServer(IDBClient::TransactionOperation& operation
     // stop future requests from going to the server ahead of it.
     operation.setNextRequestCanGoToServer(false);
 
-    value->writeBlobsToDiskForIndexedDB(scriptExecutionContext()->sessionID(), [protectedThis = makeRef(*this), this, protectedOperation = Ref<IDBClient::TransactionOperation>(operation), keyData = IDBKeyData(key.get()).isolatedCopy(), overwriteMode](IDBValue&& idbValue) mutable {
+    value->writeBlobsToDiskForIndexedDB([protectedThis = makeRef(*this), this, protectedOperation = Ref<IDBClient::TransactionOperation>(operation), keyData = IDBKeyData(key.get()).isolatedCopy(), overwriteMode](IDBValue&& idbValue) mutable {
         ASSERT(&originThread() == &Thread::current());
         ASSERT(isMainThread());
         if (idbValue.data().data()) {
index 2447825..d5afd44 100644 (file)
@@ -157,8 +157,8 @@ Ref<Blob> MediaRecorder::createRecordingDataBlob()
 {
     auto data = m_private->fetchData();
     if (!data)
-        return Blob::create(scriptExecutionContext()->sessionID());
-    return Blob::create(scriptExecutionContext()->sessionID(), *data, m_private->mimeType());
+        return Blob::create();
+    return Blob::create(*data, m_private->mimeType());
 }
 
 void MediaRecorder::didAddOrRemoveTrack()
index ebd8152..2828d36 100644 (file)
@@ -58,7 +58,7 @@ void MediaSourceRegistry::registerURL(ScriptExecutionContext&, const URL& url, U
     m_mediaSources.set(url.string(), &source);
 }
 
-void MediaSourceRegistry::unregisterURL(ScriptExecutionContext&, const URL& url)
+void MediaSourceRegistry::unregisterURL(const URL& url)
 {
     ASSERT(isMainThread());
     if (auto source = m_mediaSources.take(url.string()))
index 02d6efb..b7dfe44 100644 (file)
@@ -48,7 +48,7 @@ public:
 
     // Registers a blob URL referring to the specified media source.
     void registerURL(ScriptExecutionContext&, const URL&, URLRegistrable&)final;
-    void unregisterURL(ScriptExecutionContext&, const URL&) final;
+    void unregisterURL(const URL&) final;
     URLRegistrable* lookup(const String&) const final;
 
 private:
index a551a83..6c70127 100644 (file)
@@ -207,7 +207,7 @@ void RTCDataChannel::didReceiveRawData(const char* data, size_t dataLength)
 
     switch (m_binaryType) {
     case BinaryType::Blob:
-        scheduleDispatchEvent(MessageEvent::create(Blob::create(scriptExecutionContext()->sessionID(), SharedBuffer::create(data, dataLength), emptyString()), { }));
+        scheduleDispatchEvent(MessageEvent::create(Blob::create(SharedBuffer::create(data, dataLength), emptyString()), { }));
         return;
     case BinaryType::ArrayBuffer:
         scheduleDispatchEvent(MessageEvent::create(ArrayBuffer::create(data, dataLength)));
index 992963e..9108800 100644 (file)
@@ -584,7 +584,7 @@ void WebSocket::didReceiveBinaryData(Vector<uint8_t>&& binaryData)
     switch (m_binaryType) {
     case BinaryType::Blob:
         // FIXME: We just received the data from NetworkProcess, and are sending it back. This is inefficient.
-        dispatchEvent(MessageEvent::create(Blob::create(scriptExecutionContext()->sessionID(), WTFMove(binaryData), emptyString()), SecurityOrigin::create(m_url)->toString()));
+        dispatchEvent(MessageEvent::create(Blob::create(WTFMove(binaryData), emptyString()), SecurityOrigin::create(m_url)->toString()));
         break;
     case BinaryType::ArrayBuffer:
         dispatchEvent(MessageEvent::create(ArrayBuffer::create(binaryData.data(), binaryData.size()), SecurityOrigin::create(m_url)->toString()));
index dc6f660..982e573 100644 (file)
@@ -465,7 +465,7 @@ ThreadableWebSocketChannel::SendResult WorkerThreadableWebSocketChannel::Bridge:
         ASSERT_UNUSED(context, context.isDocument());
         ASSERT(peer);
 
-        peer->send(Blob::deserialize(context.sessionID(), url, type, size, { }));
+        peer->send(Blob::deserialize(url, type, size, { }));
     });
 
     Ref<Bridge> protectedThis(*this);
index 8dd9fbf..78ef1fe 100644 (file)
@@ -2091,7 +2091,7 @@ private:
             filePath = path->string();
 
         if (m_isDOMGlobalObject)
-            file = File::deserialize(jsCast<JSDOMGlobalObject*>(m_globalObject)->scriptExecutionContext()->sessionID(), filePath, URL(URL(), url->string()), type->string(), name->string(), optionalLastModified);
+            file = File::deserialize(filePath, URL(URL(), url->string()), type->string(), name->string(), optionalLastModified);
         return true;
     }
 
@@ -2857,7 +2857,7 @@ private:
                 return JSValue();
             if (!m_isDOMGlobalObject)
                 return jsNull();
-            return getJSValue(Blob::deserialize(jsCast<JSDOMGlobalObject*>(m_globalObject)->scriptExecutionContext()->sessionID(), URL(URL(), url->string()), type->string(), size, blobFilePathForBlobURL(url->string())).get());
+            return getJSValue(Blob::deserialize(URL(URL(), url->string()), type->string(), size, blobFilePathForBlobURL(url->string())).get());
         }
         case StringTag: {
             CachedStringRef cachedString;
@@ -3569,12 +3569,12 @@ Vector<String> SerializedScriptValue::blobURLsIsolatedCopy() const
     return result;
 }
 
-void SerializedScriptValue::writeBlobsToDiskForIndexedDB(PAL::SessionID sessionID, CompletionHandler<void(IDBValue&&)>&& completionHandler)
+void SerializedScriptValue::writeBlobsToDiskForIndexedDB(CompletionHandler<void(IDBValue&&)>&& completionHandler)
 {
     ASSERT(isMainThread());
     ASSERT(hasBlobURLs());
 
-    blobRegistry().writeBlobsToTemporaryFiles(sessionID, m_blobURLs, [completionHandler = WTFMove(completionHandler), this, protectedThis = makeRef(*this)] (auto&& blobFilePaths) mutable {
+    blobRegistry().writeBlobsToTemporaryFiles(m_blobURLs, [completionHandler = WTFMove(completionHandler), this, protectedThis = makeRef(*this)] (auto&& blobFilePaths) mutable {
         ASSERT(isMainThread());
 
         if (blobFilePaths.isEmpty()) {
@@ -3590,7 +3590,7 @@ void SerializedScriptValue::writeBlobsToDiskForIndexedDB(PAL::SessionID sessionI
     });
 }
 
-IDBValue SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously(PAL::SessionID sessionID)
+IDBValue SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously()
 {
     ASSERT(!isMainThread());
 
@@ -3599,8 +3599,8 @@ IDBValue SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously(PAL::S
     Condition condition;
     lock.lock();
 
-    RunLoop::main().dispatch([this, sessionID, conditionPtr = &condition, valuePtr = &value] {
-        writeBlobsToDiskForIndexedDB(sessionID, [conditionPtr, valuePtr](IDBValue&& result) {
+    RunLoop::main().dispatch([this, conditionPtr = &condition, valuePtr = &value] {
+        writeBlobsToDiskForIndexedDB([conditionPtr, valuePtr](IDBValue&& result) {
             ASSERT(isMainThread());
             valuePtr->setAsIsolatedCopy(result);
 
index 4f4b0cf..da84c7e 100644 (file)
@@ -93,8 +93,8 @@ public:
 
 #if ENABLE(INDEXED_DATABASE)
     Vector<String> blobURLsIsolatedCopy() const;
-    void writeBlobsToDiskForIndexedDB(PAL::SessionID, CompletionHandler<void(IDBValue&&)>&&);
-    IDBValue writeBlobsToDiskForIndexedDBSynchronously(PAL::SessionID);
+    void writeBlobsToDiskForIndexedDB(CompletionHandler<void(IDBValue&&)>&&);
+    IDBValue writeBlobsToDiskForIndexedDBSynchronously();
 #endif // ENABLE(INDEXED_DATABASE)
 
     static Ref<SerializedScriptValue> createFromWireBytes(Vector<uint8_t>&& data)
index d3af70f..5c71b36 100644 (file)
@@ -68,9 +68,8 @@ private:
 
 #endif
 
-DataTransfer::DataTransfer(const Document& document, StoreMode mode, std::unique_ptr<Pasteboard> pasteboard, Type type)
-    : m_sessionID(document.sessionID())
-    , m_storeMode(mode)
+DataTransfer::DataTransfer(StoreMode mode, std::unique_ptr<Pasteboard> pasteboard, Type type)
+    : m_storeMode(mode)
     , m_pasteboard(WTFMove(pasteboard))
 #if ENABLE(DRAG_SUPPORT)
     , m_type(type)
@@ -86,7 +85,7 @@ DataTransfer::DataTransfer(const Document& document, StoreMode mode, std::unique
 
 Ref<DataTransfer> DataTransfer::createForCopyAndPaste(const Document& document, StoreMode storeMode, std::unique_ptr<Pasteboard>&& pasteboard)
 {
-    auto dataTransfer = adoptRef(*new DataTransfer(document, storeMode, WTFMove(pasteboard)));
+    auto dataTransfer = adoptRef(*new DataTransfer(storeMode, WTFMove(pasteboard)));
     dataTransfer->m_originIdentifier = document.originIdentifierForPasteboard();
     return dataTransfer;
 }
@@ -349,7 +348,7 @@ Vector<Ref<File>> DataTransfer::filesFromPasteboardAndItemList() const
     bool addedFilesFromPasteboard = false;
     Vector<Ref<File>> files;
     if ((!forDrag() || forFileDrag()) && m_pasteboard->fileContentState() != Pasteboard::FileContentState::NoFileOrImageData) {
-        WebCorePasteboardFileReader reader { m_sessionID };
+        WebCorePasteboardFileReader reader;
         m_pasteboard->read(reader);
         files = WTFMove(reader.files);
         addedFilesFromPasteboard = !files.isEmpty();
@@ -414,12 +413,12 @@ bool DataTransfer::hasStringOfType(const String& type)
     return !type.isNull() && types().contains(type);
 }
 
-Ref<DataTransfer> DataTransfer::createForInputEvent(const Document& document, const String& plainText, const String& htmlText)
+Ref<DataTransfer> DataTransfer::createForInputEvent(const String& plainText, const String& htmlText)
 {
     auto pasteboard = makeUnique<StaticPasteboard>();
     pasteboard->writeString("text/plain"_s, plainText);
     pasteboard->writeString("text/html"_s, htmlText);
-    return adoptRef(*new DataTransfer(document, StoreMode::Readonly, WTFMove(pasteboard), Type::InputEvent));
+    return adoptRef(*new DataTransfer(StoreMode::Readonly, WTFMove(pasteboard), Type::InputEvent));
 }
 
 void DataTransfer::commitToPasteboard(Pasteboard& nativePasteboard)
@@ -464,21 +463,21 @@ void DataTransfer::setDragImage(Element*, int, int)
 
 #else
 
-Ref<DataTransfer> DataTransfer::createForDrag(const Document& document)
+Ref<DataTransfer> DataTransfer::createForDrag()
 {
-    return adoptRef(*new DataTransfer(document, StoreMode::ReadWrite, Pasteboard::createForDragAndDrop(), Type::DragAndDropData));
+    return adoptRef(*new DataTransfer(StoreMode::ReadWrite, Pasteboard::createForDragAndDrop(), Type::DragAndDropData));
 }
 
 Ref<DataTransfer> DataTransfer::createForDragStartEvent(const Document& document)
 {
-    auto dataTransfer = adoptRef(*new DataTransfer(document, StoreMode::ReadWrite, makeUnique<StaticPasteboard>(), Type::DragAndDropData));
+    auto dataTransfer = adoptRef(*new DataTransfer(StoreMode::ReadWrite, makeUnique<StaticPasteboard>(), Type::DragAndDropData));
     dataTransfer->m_originIdentifier = document.originIdentifierForPasteboard();
     return dataTransfer;
 }
 
 Ref<DataTransfer> DataTransfer::createForDrop(const Document& document, std::unique_ptr<Pasteboard>&& pasteboard, DragOperation sourceOperation, bool draggingFiles)
 {
-    auto dataTransfer = adoptRef(*new DataTransfer(document, DataTransfer::StoreMode::Readonly, WTFMove(pasteboard), draggingFiles ? Type::DragAndDropFiles : Type::DragAndDropData));
+    auto dataTransfer = adoptRef(*new DataTransfer(DataTransfer::StoreMode::Readonly, WTFMove(pasteboard), draggingFiles ? Type::DragAndDropFiles : Type::DragAndDropData));
     dataTransfer->setSourceOperation(sourceOperation);
     dataTransfer->m_originIdentifier = document.originIdentifierForPasteboard();
     return dataTransfer;
@@ -486,7 +485,7 @@ Ref<DataTransfer> DataTransfer::createForDrop(const Document& document, std::uni
 
 Ref<DataTransfer> DataTransfer::createForUpdatingDropTarget(const Document& document, std::unique_ptr<Pasteboard>&& pasteboard, DragOperation sourceOperation, bool draggingFiles)
 {
-    auto dataTransfer = adoptRef(*new DataTransfer(document, DataTransfer::StoreMode::Protected, WTFMove(pasteboard), draggingFiles ? Type::DragAndDropFiles : Type::DragAndDropData));
+    auto dataTransfer = adoptRef(*new DataTransfer(DataTransfer::StoreMode::Protected, WTFMove(pasteboard), draggingFiles ? Type::DragAndDropFiles : Type::DragAndDropData));
     dataTransfer->setSourceOperation(sourceOperation);
     dataTransfer->m_originIdentifier = document.originIdentifierForPasteboard();
     return dataTransfer;
index 6aecac8..c9726a6 100644 (file)
@@ -48,7 +48,7 @@ public:
     enum class StoreMode { Invalid, ReadWrite, Readonly, Protected };
 
     static Ref<DataTransfer> createForCopyAndPaste(const Document&, StoreMode, std::unique_ptr<Pasteboard>&&);
-    static Ref<DataTransfer> createForInputEvent(const Document&, const String& plainText, const String& htmlText);
+    static Ref<DataTransfer> createForInputEvent(const String& plainText, const String& htmlText);
 
     WEBCORE_EXPORT ~DataTransfer();
 
@@ -87,7 +87,7 @@ public:
     void commitToPasteboard(Pasteboard&);
 
 #if ENABLE(DRAG_SUPPORT)
-    static Ref<DataTransfer> createForDrag(const Document&);
+    static Ref<DataTransfer> createForDrag();
     static Ref<DataTransfer> createForDragStartEvent(const Document&);
     static Ref<DataTransfer> createForDrop(const Document&, std::unique_ptr<Pasteboard>&&, DragOperation, bool draggingFiles);
     static Ref<DataTransfer> createForUpdatingDropTarget(const Document&, std::unique_ptr<Pasteboard>&&, DragOperation, bool draggingFiles);
@@ -113,7 +113,7 @@ public:
 
 private:
     enum class Type { CopyAndPaste, DragAndDropData, DragAndDropFiles, InputEvent };
-    DataTransfer(const Document&, StoreMode, std::unique_ptr<Pasteboard>, Type = Type::CopyAndPaste);
+    DataTransfer(StoreMode, std::unique_ptr<Pasteboard>, Type = Type::CopyAndPaste);
 
 #if ENABLE(DRAG_SUPPORT)
     bool forDrag() const { return m_type == Type::DragAndDropData || m_type == Type::DragAndDropFiles; }
@@ -130,7 +130,6 @@ private:
     Vector<String> types(AddFilesType) const;
     Vector<Ref<File>> filesFromPasteboardAndItemList() const;
 
-    PAL::SessionID m_sessionID;
     String m_originIdentifier;
     StoreMode m_storeMode;
     std::unique_ptr<Pasteboard> m_pasteboard;
index 52b69a5..041f9d1 100644 (file)
@@ -82,7 +82,7 @@ String ReplaceRangeWithTextCommand::inputEventData() const
 RefPtr<DataTransfer> ReplaceRangeWithTextCommand::inputEventDataTransfer() const
 {
     if (!isEditingTextAreaOrTextInput())
-        return DataTransfer::createForInputEvent(document(), m_text, serializeFragment(*m_textFragment, SerializedNodes::SubtreeIncludingNode));
+        return DataTransfer::createForInputEvent(m_text, serializeFragment(*m_textFragment, SerializedNodes::SubtreeIncludingNode));
 
     return CompositeEditCommand::inputEventDataTransfer();
 }
index 62be447..7506cdc 100644 (file)
@@ -1422,7 +1422,7 @@ RefPtr<DataTransfer> ReplaceSelectionCommand::inputEventDataTransfer() const
     if (isEditingTextAreaOrTextInput())
         return CompositeEditCommand::inputEventDataTransfer();
 
-    return DataTransfer::createForInputEvent(document(), m_documentFragmentPlainText, m_documentFragmentHTMLMarkup);
+    return DataTransfer::createForInputEvent(m_documentFragmentPlainText, m_documentFragmentHTMLMarkup);
 }
 
 bool ReplaceSelectionCommand::shouldRemoveEndBR(Node* endBR, const VisiblePosition& originalVisPosBeforeEndBR)
index 3718aa4..7db3f9b 100644 (file)
@@ -130,7 +130,7 @@ Vector<RefPtr<StaticRange>> SpellingCorrectionCommand::targetRanges() const
 RefPtr<DataTransfer> SpellingCorrectionCommand::inputEventDataTransfer() const
 {
     if (!isEditingTextAreaOrTextInput())
-        return DataTransfer::createForInputEvent(document(), m_correction, serializeFragment(*m_correctionFragment, SerializedNodes::SubtreeIncludingNode));
+        return DataTransfer::createForInputEvent(m_correction, serializeFragment(*m_correctionFragment, SerializedNodes::SubtreeIncludingNode));
 
     return CompositeEditCommand::inputEventDataTransfer();
 }
index f358743..01f53db 100644 (file)
@@ -425,7 +425,7 @@ RefPtr<DataTransfer> TypingCommand::inputEventDataTransfer() const
 
     StringBuilder htmlText;
     MarkupAccumulator::appendCharactersReplacingEntities(htmlText, m_currentTextToInsert, 0, m_currentTextToInsert.length(), EntityMaskInHTMLPCDATA);
-    return DataTransfer::createForInputEvent(document(), m_currentTextToInsert, htmlText.toString());
+    return DataTransfer::createForInputEvent(m_currentTextToInsert, htmlText.toString());
 }
 
 void TypingCommand::didApplyCommand()
index 64de91d..f68a00e 100644 (file)
@@ -35,12 +35,12 @@ WebCorePasteboardFileReader::~WebCorePasteboardFileReader() = default;
 
 void WebCorePasteboardFileReader::readFilename(const String& filename)
 {
-    files.append(File::create(sessionID, filename));
+    files.append(File::create(filename));
 }
 
 void WebCorePasteboardFileReader::readBuffer(const String& filename, const String& type, Ref<SharedBuffer>&& buffer)
 {
-    files.append(File::create(Blob::create(sessionID, buffer.get(), type), filename));
+    files.append(File::create(Blob::create(buffer.get(), type), filename));
 }
 
 }
index 9438b44..9b9fa77 100644 (file)
@@ -33,17 +33,12 @@ namespace WebCore {
 class File;
 
 struct WebCorePasteboardFileReader final : PasteboardFileReader {
-    explicit WebCorePasteboardFileReader(PAL::SessionID sessionID)
-        : sessionID(sessionID)
-    {
-    }
-
+    WebCorePasteboardFileReader() = default;
     ~WebCorePasteboardFileReader();
 
     void readFilename(const String&) final;
     void readBuffer(const String& filename, const String& type, Ref<SharedBuffer>&&) final;
 
-    PAL::SessionID sessionID;
     Vector<Ref<File>> files;
 };
 
index 0cf2fc3..39496b6 100644 (file)
@@ -259,7 +259,7 @@ static Ref<DocumentFragment> createFragmentForImageAttachment(Frame& frame, Docu
         frame.editor().registerAttachmentIdentifier(attachment->ensureUniqueIdentifier(), contentType, defaultImageAttachmentName, WTFMove(buffer));
         if (contentTypeIsSuitableForInlineImageRepresentation(contentType)) {
             auto image = HTMLImageElement::create(document);
-            image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, Blob::create(document.sessionID(), buffer.get(), contentType)));
+            image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, Blob::create(buffer.get(), contentType)));
             image->setAttachmentElement(WTFMove(attachment));
             if (preferredSize.width)
                 image->setAttributeWithoutSynchronization(HTMLNames::widthAttr, AtomString::number(*preferredSize.width));
@@ -271,7 +271,7 @@ static Ref<DocumentFragment> createFragmentForImageAttachment(Frame& frame, Docu
             fragment->appendChild(WTFMove(attachment));
         }
     } else {
-        attachment->setFile(File::create(Blob::create(document.sessionID(), buffer.get(), contentType), defaultImageAttachmentName), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
+        attachment->setFile(File::create(Blob::create(buffer.get(), contentType), defaultImageAttachmentName), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
         fragment->appendChild(WTFMove(attachment));
     }
     return fragment;
@@ -365,7 +365,7 @@ static void replaceRichContentWithAttachments(Frame& frame, DocumentFragment& fr
         if (supportsClientSideAttachmentData(frame)) {
             if (is<HTMLImageElement>(originalElement.get()) && contentTypeIsSuitableForInlineImageRepresentation(info.contentType)) {
                 auto& image = downcast<HTMLImageElement>(originalElement.get());
-                image.setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(*frame.document(), Blob::create(fragment.document().sessionID(), info.data, info.contentType)));
+                image.setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(*frame.document(), Blob::create(info.data, info.contentType)));
                 image.setAttachmentElement(attachment.copyRef());
             } else {
                 attachment->updateAttributes(info.data->size(), info.contentType, info.fileName);
@@ -373,7 +373,7 @@ static void replaceRichContentWithAttachments(Frame& frame, DocumentFragment& fr
             }
             frame.editor().registerAttachmentIdentifier(attachment->ensureUniqueIdentifier(), WTFMove(info.contentType), WTFMove(info.fileName), WTFMove(info.data));
         } else {
-            attachment->setFile(File::create(Blob::create(fragment.document().sessionID(), WTFMove(info.data), WTFMove(info.contentType)), WTFMove(info.fileName)), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
+            attachment->setFile(File::create(Blob::create(WTFMove(info.data), WTFMove(info.contentType)), WTFMove(info.fileName)), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
             parent->replaceChild(WTFMove(attachment), WTFMove(originalElement));
         }
     }
@@ -415,7 +415,7 @@ RefPtr<DocumentFragment> createFragmentAndAddResources(Frame& frame, NSAttribute
 
     HashMap<AtomString, AtomString> blobURLMap;
     for (const Ref<ArchiveResource>& subresource : fragmentAndResources.resources) {
-        auto blob = Blob::create(document.sessionID(), subresource->data(), subresource->mimeType());
+        auto blob = Blob::create(subresource->data(), subresource->mimeType());
         String blobURL = DOMURL::createObjectURL(document, blob);
         blobURLMap.set(subresource->url().string(), blobURL);
     }
@@ -464,7 +464,7 @@ static String sanitizeMarkupWithArchive(Frame& frame, Document& destinationDocum
         auto& subresourceURL = subresource->url();
         if (!shouldReplaceSubresourceURL(subresourceURL))
             continue;
-        auto blob = Blob::create(destinationDocument.sessionID(), subresource->data(), subresource->mimeType());
+        auto blob = Blob::create(subresource->data(), subresource->mimeType());
         String blobURL = DOMURL::createObjectURL(destinationDocument, blob);
         blobURLMap.set(subresourceURL.string(), blobURL);
     }
@@ -491,7 +491,7 @@ static String sanitizeMarkupWithArchive(Frame& frame, Document& destinationDocum
         Vector<uint8_t> blobBuffer;
         blobBuffer.reserveCapacity(utf8.length());
         blobBuffer.append(reinterpret_cast<const uint8_t*>(utf8.data()), utf8.length());
-        auto blob = Blob::create(destinationDocument.sessionID(), WTFMove(blobBuffer), type);
+        auto blob = Blob::create(WTFMove(blobBuffer), type);
 
         String subframeBlobURL = DOMURL::createObjectURL(destinationDocument, blob);
         blobURLMap.set(subframeURL.string(), subframeBlobURL);
@@ -688,7 +688,7 @@ bool WebContentReader::readImage(Ref<SharedBuffer>&& buffer, const String& type,
     if (shouldReplaceRichContentWithAttachments())
         addFragment(createFragmentForImageAttachment(frame, document, WTFMove(buffer), type, preferredPresentationSize));
     else
-        addFragment(createFragmentForImageAndURL(document, DOMURL::createObjectURL(document, Blob::create(document.sessionID(), buffer.get(), type)), preferredPresentationSize));
+        addFragment(createFragmentForImageAndURL(document, DOMURL::createObjectURL(document, Blob::create(buffer.get(), type)), preferredPresentationSize));
 
     return fragment;
 }
@@ -709,7 +709,7 @@ static Ref<HTMLElement> attachmentForFilePath(Frame& frame, const String& path,
     auto document = makeRef(*frame.document());
     auto attachment = HTMLAttachmentElement::create(HTMLNames::attachmentTag, document);
     if (!supportsClientSideAttachmentData(frame)) {
-        attachment->setFile(File::create(document->sessionID(), path), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
+        attachment->setFile(File::create(path), HTMLAttachmentElement::UpdateDisplayAttributes::Yes);
         return attachment;
     }
 
@@ -736,7 +736,7 @@ static Ref<HTMLElement> attachmentForFilePath(Frame& frame, const String& path,
 
     if (contentTypeIsSuitableForInlineImageRepresentation(contentType)) {
         auto image = HTMLImageElement::create(document);
-        image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, File::create(document->sessionID(), path)));
+        image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, File::create(path)));
         image->setAttachmentElement(WTFMove(attachment));
         if (preferredSize.width)
             image->setAttributeWithoutSynchronization(HTMLNames::widthAttr, AtomString::number(*preferredSize.width));
@@ -765,7 +765,7 @@ static Ref<HTMLElement> attachmentForData(Frame& frame, SharedBuffer& buffer, co
         fileName = name;
 
     if (!supportsClientSideAttachmentData(frame)) {
-        attachment->setFile(File::create(Blob::create(document->sessionID(), buffer, WTFMove(attachmentType)), fileName));
+        attachment->setFile(File::create(Blob::create(buffer, WTFMove(attachmentType)), fileName));
         return attachment;
     }
 
@@ -773,7 +773,7 @@ static Ref<HTMLElement> attachmentForData(Frame& frame, SharedBuffer& buffer, co
 
     if (contentTypeIsSuitableForInlineImageRepresentation(attachmentType)) {
         auto image = HTMLImageElement::create(document);
-        image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, File::create(Blob::create(document->sessionID(), buffer, WTFMove(attachmentType)), WTFMove(fileName))));
+        image->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document, File::create(Blob::create(buffer, WTFMove(attachmentType)), WTFMove(fileName))));
         image->setAttachmentElement(WTFMove(attachment));
         if (preferredSize.width)
             image->setAttributeWithoutSynchronization(HTMLNames::widthAttr, AtomString::number(*preferredSize.width));
index 7aff17b..706e826 100644 (file)
@@ -66,7 +66,7 @@ static RefPtr<DocumentFragment> createFragmentFromPasteboardData(Pasteboard& pas
             return CAIRO_STATUS_SUCCESS;
         }, &buffer);
         if (status == CAIRO_STATUS_SUCCESS) {
-            auto blob = Blob::create(frame.document()->sessionID(), WTFMove(buffer), "image/png");
+            auto blob = Blob::create(WTFMove(buffer), "image/png");
             if (!frame.document())
                 return nullptr;
             return createFragmentForImageAndURL(*frame.document(), DOMURL::createObjectURL(*frame.document(), blob), { });
index 124a5ab..b34bc06 100644 (file)
@@ -985,9 +985,9 @@ static void restoreAttachmentElementsInFragment(DocumentFragment& fragment)
         auto attachmentPath = attachment->attachmentPath();
         auto blobURL = attachment->blobURL();
         if (!attachmentPath.isEmpty())
-            attachment->setFile(File::create(fragment.document().sessionID(), attachmentPath));
+            attachment->setFile(File::create(attachmentPath));
         else if (!blobURL.isEmpty())
-            attachment->setFile(File::deserialize(fragment.document().sessionID(), { }, blobURL, attachment->attachmentType(), attachment->attachmentTitle()));
+            attachment->setFile(File::deserialize({ }, blobURL, attachment->attachmentType(), attachment->attachmentTitle()));
 
         // Remove temporary attributes that were previously added in StyledMarkupAccumulator::appendCustomAttributes.
         attachment->removeAttribute(webkitattachmentidAttr);
index d891c70..233c766 100644 (file)
@@ -49,7 +49,7 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(Blob);
 class BlobURLRegistry final : public URLRegistry {
 public:
     void registerURL(ScriptExecutionContext&, const URL&, URLRegistrable&) final;
-    void unregisterURL(ScriptExecutionContext&, const URL&) final;
+    void unregisterURL(const URL&) final;
 
     static URLRegistry& registry();
 };
@@ -58,12 +58,12 @@ public:
 void BlobURLRegistry::registerURL(ScriptExecutionContext& context, const URL& publicURL, URLRegistrable& blob)
 {
     ASSERT(&blob.registry() == this);
-    ThreadableBlobRegistry::registerBlobURL(context.sessionID(), context.securityOrigin(), publicURL, static_cast<Blob&>(blob).url());
+    ThreadableBlobRegistry::registerBlobURL(context.securityOrigin(), publicURL, static_cast<Blob&>(blob).url());
 }
 
-void BlobURLRegistry::unregisterURL(ScriptExecutionContext& context, const URL& url)
+void BlobURLRegistry::unregisterURL(const URL& url)
 {
-    ThreadableBlobRegistry::unregisterBlobURL(context.sessionID(), url);
+    ThreadableBlobRegistry::unregisterBlobURL(url);
 }
 
 URLRegistry& BlobURLRegistry::registry()
@@ -72,24 +72,21 @@ URLRegistry& BlobURLRegistry::registry()
     return instance;
 }
 
-Blob::Blob(UninitializedContructor, PAL::SessionID sessionID, URL&& url, String&& type)
-    : m_sessionID(sessionID)
-    , m_internalURL(WTFMove(url))
+Blob::Blob(UninitializedContructor, URL&& url, String&& type)
+    : m_internalURL(WTFMove(url))
     , m_type(WTFMove(type))
 {
 }
 
-Blob::Blob(PAL::SessionID sessionID)
-    : m_sessionID(sessionID)
-    , m_size(0)
+Blob::Blob()
+    : m_size(0)
 {
     m_internalURL = BlobURL::createInternalURL();
-    ThreadableBlobRegistry::registerBlobURL(m_sessionID, m_internalURL, { },  { });
+    ThreadableBlobRegistry::registerBlobURL(m_internalURL, { },  { });
 }
 
-Blob::Blob(PAL::SessionID sessionID, Vector<BlobPartVariant>&& blobPartVariants, const BlobPropertyBag& propertyBag)
-    : m_sessionID(sessionID)
-    , m_internalURL(BlobURL::createInternalURL())
+Blob::Blob(Vector<BlobPartVariant>&& blobPartVariants, const BlobPropertyBag& propertyBag)
+    : m_internalURL(BlobURL::createInternalURL())
     , m_type(normalizedContentType(propertyBag.type))
 {
     BlobBuilder builder(propertyBag.endings);
@@ -101,12 +98,11 @@ Blob::Blob(PAL::SessionID sessionID, Vector<BlobPartVariant>&& blobPartVariants,
         );
     }
 
-    ThreadableBlobRegistry::registerBlobURL(m_sessionID, m_internalURL, builder.finalize(), m_type);
+    ThreadableBlobRegistry::registerBlobURL(m_internalURL, builder.finalize(), m_type);
 }
 
-Blob::Blob(PAL::SessionID sessionID, const SharedBuffer& buffer, const String& contentType)
-    : m_sessionID(sessionID)
-    , m_type(contentType)
+Blob::Blob(const SharedBuffer& buffer, const String& contentType)
+    : m_type(contentType)
     , m_size(buffer.size())
 {
     Vector<uint8_t> data;
@@ -115,53 +111,49 @@ Blob::Blob(PAL::SessionID sessionID, const SharedBuffer& buffer, const String& c
     Vector<BlobPart> blobParts;
     blobParts.append(BlobPart(WTFMove(data)));
     m_internalURL = BlobURL::createInternalURL();
-    ThreadableBlobRegistry::registerBlobURL(m_sessionID, m_internalURL, WTFMove(blobParts), contentType);
+    ThreadableBlobRegistry::registerBlobURL(m_internalURL, WTFMove(blobParts), contentType);
 }
 
-Blob::Blob(PAL::SessionID sessionID, Vector<uint8_t>&& data, const String& contentType)
-    : m_sessionID(sessionID)
-    , m_type(contentType)
+Blob::Blob(Vector<uint8_t>&& data, const String& contentType)
+    : m_type(contentType)
     , m_size(data.size())
 {
     Vector<BlobPart> blobParts;
     blobParts.append(BlobPart(WTFMove(data)));
     m_internalURL = BlobURL::createInternalURL();
-    ThreadableBlobRegistry::registerBlobURL(m_sessionID, m_internalURL, WTFMove(blobParts), contentType);
+    ThreadableBlobRegistry::registerBlobURL(m_internalURL, WTFMove(blobParts), contentType);
 }
 
 Blob::Blob(ReferencingExistingBlobConstructor, const Blob& blob)
-    : m_sessionID(blob.m_sessionID)
-    , m_internalURL(BlobURL::createInternalURL())
+    : m_internalURL(BlobURL::createInternalURL())
     , m_type(blob.type())
     , m_size(blob.size())
 {
-    ThreadableBlobRegistry::registerBlobURL(m_sessionID, m_internalURL, { BlobPart(blob.url()) } , m_type);
+    ThreadableBlobRegistry::registerBlobURL(m_internalURL, { BlobPart(blob.url()) } , m_type);
 }
 
-Blob::Blob(DeserializationContructor, PAL::SessionID sessionID, const URL& srcURL, const String& type, Optional<unsigned long long> size, const String& fileBackedPath)
-    : m_sessionID(sessionID)
-    , m_type(normalizedContentType(type))
+Blob::Blob(DeserializationContructor, const URL& srcURL, const String& type, Optional<unsigned long long> size, const String& fileBackedPath)
+    : m_type(normalizedContentType(type))
     , m_size(size)
 {
     m_internalURL = BlobURL::createInternalURL();
     if (fileBackedPath.isEmpty())
-        ThreadableBlobRegistry::registerBlobURL(m_sessionID, nullptr, m_internalURL, srcURL);
+        ThreadableBlobRegistry::registerBlobURL(nullptr, m_internalURL, srcURL);
     else
-        ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_sessionID, m_internalURL, srcURL, fileBackedPath, m_type);
+        ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_internalURL, srcURL, fileBackedPath, m_type);
 }
 
-Blob::Blob(PAL::SessionID sessionID, const URL& srcURL, long long start, long long end, const String& type)
-    : m_sessionID(sessionID)
-    , m_type(normalizedContentType(type))
+Blob::Blob(const URL& srcURL, long long start, long long end, const String& type)
+    : m_type(normalizedContentType(type))
     // m_size is not necessarily equal to end - start so we do not initialize it here.
 {
     m_internalURL = BlobURL::createInternalURL();
-    ThreadableBlobRegistry::registerBlobURLForSlice(m_sessionID, m_internalURL, srcURL, start, end);
+    ThreadableBlobRegistry::registerBlobURLForSlice(m_internalURL, srcURL, start, end);
 }
 
 Blob::~Blob()
 {
-    ThreadableBlobRegistry::unregisterBlobURL(m_sessionID, m_internalURL);
+    ThreadableBlobRegistry::unregisterBlobURL(m_internalURL);
 }
 
 unsigned long long Blob::size() const
index 2c7a7b0..738974a 100644 (file)
@@ -37,7 +37,6 @@
 #include <wtf/IsoMalloc.h>
 #include <wtf/URL.h>
 #include "URLRegistry.h"
-#include <pal/SessionID.h>
 #include <wtf/Variant.h>
 
 namespace JSC {
@@ -56,30 +55,30 @@ using BlobPartVariant = Variant<RefPtr<JSC::ArrayBufferView>, RefPtr<JSC::ArrayB
 class Blob : public ScriptWrappable, public URLRegistrable, public RefCounted<Blob> {
     WTF_MAKE_ISO_ALLOCATED_EXPORT(Blob, WEBCORE_EXPORT);
 public:
-    static Ref<Blob> create(PAL::SessionID sessionID)
+    static Ref<Blob> create()
     {
-        return adoptRef(*new Blob(sessionID));
+        return adoptRef(*new Blob);
     }
 
-    static Ref<Blob> create(ScriptExecutionContext& context, Vector<BlobPartVariant>&& blobPartVariants, const BlobPropertyBag& propertyBag)
+    static Ref<Blob> create(Vector<BlobPartVariant>&& blobPartVariants, const BlobPropertyBag& propertyBag)
     {
-        return adoptRef(*new Blob(context.sessionID(), WTFMove(blobPartVariants), propertyBag));
+        return adoptRef(*new Blob(WTFMove(blobPartVariants), propertyBag));
     }
 
-    static Ref<Blob> create(PAL::SessionID sessionID, const SharedBuffer& buffer, const String& contentType)
+    static Ref<Blob> create(const SharedBuffer& buffer, const String& contentType)
     {
-        return adoptRef(*new Blob(sessionID, buffer, contentType));
+        return adoptRef(*new Blob(buffer, contentType));
     }
 
-    static Ref<Blob> create(PAL::SessionID sessionID, Vector<uint8_t>&& data, const String& contentType)
+    static Ref<Blob> create(Vector<uint8_t>&& data, const String& contentType)
     {
-        return adoptRef(*new Blob(sessionID, WTFMove(data), contentType));
+        return adoptRef(*new Blob(WTFMove(data), contentType));
     }
 
-    static Ref<Blob> deserialize(PAL::SessionID sessionID, const URL& srcURL, const String& type, long long size, const String& fileBackedPath)
+    static Ref<Blob> deserialize(const URL& srcURL, const String& type, long long size, const String& fileBackedPath)
     {
         ASSERT(Blob::isNormalizedContentType(type));
-        return adoptRef(*new Blob(deserializationContructor, sessionID, srcURL, type, size, fileBackedPath));
+        return adoptRef(*new Blob(deserializationContructor, srcURL, type, size, fileBackedPath));
     }
 
     virtual ~Blob();
@@ -104,30 +103,28 @@ public:
 
     Ref<Blob> slice(long long start = 0, long long end = std::numeric_limits<long long>::max(), const String& contentType = String()) const
     {
-        return adoptRef(*new Blob(m_sessionID, m_internalURL, start, end, contentType));
+        return adoptRef(*new Blob(m_internalURL, start, end, contentType));
     }
 
 protected:
-    WEBCORE_EXPORT explicit Blob(PAL::SessionID);
-    Blob(PAL::SessionID, Vector<BlobPartVariant>&&, const BlobPropertyBag&);
-    Blob(PAL::SessionID, const SharedBuffer&, const String& contentType);
-    Blob(PAL::SessionID, Vector<uint8_t>&&, const String& contentType);
+    WEBCORE_EXPORT Blob();
+    Blob(Vector<BlobPartVariant>&&, const BlobPropertyBag&);
+    Blob(const SharedBuffer&, const String& contentType);
+    Blob(Vector<uint8_t>&&, const String& contentType);
 
     enum ReferencingExistingBlobConstructor { referencingExistingBlobConstructor };
     Blob(ReferencingExistingBlobConstructor, const Blob&);
 
     enum UninitializedContructor { uninitializedContructor };
-    Blob(UninitializedContructor, PAL::SessionID, URL&&, String&& type);
+    Blob(UninitializedContructor, URL&&, String&& type);
 
     enum DeserializationContructor { deserializationContructor };
-    Blob(DeserializationContructor, PAL::SessionID, const URL& srcURL, const String& type, Optional<unsigned long long> size, const String& fileBackedPath);
+    Blob(DeserializationContructor, const URL& srcURL, const String& type, Optional<unsigned long long> size, const String& fileBackedPath);
 
     // For slicing.
-    Blob(PAL::SessionID, const URL& srcURL, long long start, long long end, const String& contentType);
+    Blob(const URL& srcURL, long long start, long long end, const String& contentType);
 
 private:
-    PAL::SessionID m_sessionID;
-
     // This is an internal URL referring to the blob data associated with this object. It serves
     // as an identifier for this blob. The internal URL is never used to source the blob's content
     // into an HTML or for FileRead'ing, public blob URLs must be used for those purposes.
index ae552a9..69d0f15 100644 (file)
@@ -35,7 +35,6 @@ typedef (BufferSource or Blob or USVString) BlobPart;
     GenerateIsReachable=Impl,
     CustomToJSObject,
     Constructor(optional sequence<BlobPart> blobParts, optional BlobPropertyBag options),
-    ConstructorCallWith=ScriptExecutionContext,
 ] interface Blob {
     readonly attribute unsigned long long size;
     readonly attribute DOMString type;
index a8f46d1..6afb3ef 100644 (file)
@@ -39,34 +39,34 @@ namespace WebCore {
 
 WTF_MAKE_ISO_ALLOCATED_IMPL(File);
 
-Ref<File> File::createWithRelativePath(PAL::SessionID sessionID, const String& path, const String& relativePath)
+Ref<File> File::createWithRelativePath(const String& path, const String& relativePath)
 {
-    auto file = File::create(sessionID, path);
+    auto file = File::create(path);
     file->setRelativePath(relativePath);
     return file;
 }
 
-Ref<File> File::create(PAL::SessionID sessionID, const String& path, const String& nameOverride)
+Ref<File> File::create(const String& path, const String& nameOverride)
 {
     String name;
     String type;
     computeNameAndContentType(path, nameOverride, name, type);
 
     auto internalURL = BlobURL::createInternalURL();
-    ThreadableBlobRegistry::registerFileBlobURL(sessionID, internalURL, path, type);
+    ThreadableBlobRegistry::registerFileBlobURL(internalURL, path, type);
 
-    return adoptRef(*new File(sessionID, WTFMove(internalURL), WTFMove(type), String { path }, WTFMove(name)));
+    return adoptRef(*new File(WTFMove(internalURL), WTFMove(type), String { path }, WTFMove(name)));
 }
 
-File::File(PAL::SessionID sessionID, URL&& url, String&& type, String&& path, String&& name)
-    : Blob(uninitializedContructor, sessionID, WTFMove(url), WTFMove(type))
+File::File(URL&& url, String&& type, String&& path, String&& name)
+    : Blob(uninitializedContructor, WTFMove(url), WTFMove(type))
     , m_path(WTFMove(path))
     , m_name(WTFMove(name))
 {
 }
 
-File::File(DeserializationContructor, PAL::SessionID sessionID, const String& path, const URL& url, const String& type, const String& name, const Optional<int64_t>& lastModified)
-    : Blob(deserializationContructor, sessionID, url, type, { }, path)
+File::File(DeserializationContructor, const String& path, const URL& url, const String& type, const String& name, const Optional<int64_t>& lastModified)
+    : Blob(deserializationContructor, url, type, { }, path)
     , m_path(path)
     , m_name(name)
     , m_lastModifiedDateOverride(lastModified)
@@ -80,8 +80,8 @@ static BlobPropertyBag convertPropertyBag(const File::PropertyBag& initialBag)
     return bag;
 }
 
-File::File(ScriptExecutionContext& context, Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag& propertyBag)
-    : Blob(context.sessionID(), WTFMove(blobPartVariants), convertPropertyBag(propertyBag))
+File::File(Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag& propertyBag)
+    : Blob(WTFMove(blobPartVariants), convertPropertyBag(propertyBag))
     , m_name(filename)
     , m_lastModifiedDateOverride(propertyBag.lastModified.valueOr(WallTime::now().secondsSinceEpoch().milliseconds()))
 {
index de3a3cb..d2f938b 100644 (file)
@@ -42,17 +42,17 @@ public:
     };
 
     // Create a file with an optional name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
-    WEBCORE_EXPORT static Ref<File> create(PAL::SessionID, const String& path, const String& nameOverride = { });
+    WEBCORE_EXPORT static Ref<File> create(const String& path, const String& nameOverride = { });
 
     // Create a File using the 'new File' constructor.
-    static Ref<File> create(ScriptExecutionContext& context, Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag& propertyBag)
+    static Ref<File> create(Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag& propertyBag)
     {
-        return adoptRef(*new File(context, WTFMove(blobPartVariants), filename, propertyBag));
+        return adoptRef(*new File(WTFMove(blobPartVariants), filename, propertyBag));
     }
 
-    static Ref<File> deserialize(PAL::SessionID sessionID, const String& path, const URL& srcURL, const String& type, const String& name, const Optional<int64_t>& lastModified = WTF::nullopt)
+    static Ref<File> deserialize(const String& path, const URL& srcURL, const String& type, const String& name, const Optional<int64_t>& lastModified = WTF::nullopt)
     {
-        return adoptRef(*new File(deserializationContructor, sessionID, path, srcURL, type, name, lastModified));
+        return adoptRef(*new File(deserializationContructor, path, srcURL, type, name, lastModified));
     }
 
     static Ref<File> create(const Blob& blob, const String& name)
@@ -65,7 +65,7 @@ public:
         return adoptRef(*new File(file, name));
     }
 
-    static Ref<File> createWithRelativePath(PAL::SessionID, const String& path, const String& relativePath);
+    static Ref<File> createWithRelativePath(const String& path, const String& relativePath);
 
     bool isFile() const override { return true; }
 
@@ -85,13 +85,13 @@ public:
     bool isDirectory() const;
 
 private:
-    WEBCORE_EXPORT explicit File(PAL::SessionID, const String& path);
-    File(PAL::SessionID, URL&&, String&& type, String&& path, String&& name);
-    File(ScriptExecutionContext&, Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag&);
+    WEBCORE_EXPORT explicit File(const String& path);
+    File(URL&&, String&& type, String&& path, String&& name);
+    File(Vector<BlobPartVariant>&& blobPartVariants, const String& filename, const PropertyBag&);
     File(const Blob&, const String& name);
     File(const File&, const String& name);
 
-    File(DeserializationContructor, PAL::SessionID, const String& path, const URL& srcURL, const String& type, const String& name, const Optional<int64_t>& lastModified);
+    File(DeserializationContructor, const String& path, const URL& srcURL, const String& type, const String& name, const Optional<int64_t>& lastModified);
 
     static void computeNameAndContentType(const String& path, const String& nameOverride, String& effectiveName, String& effectiveContentType);
 #if ENABLE(FILE_REPLACEMENT)
index bf76dcd..4cf547e 100644 (file)
@@ -28,7 +28,6 @@ typedef (BufferSource or Blob or USVString) BlobPart;
 // FIXME: This should be exposed on Workers as well.
 [
     Constructor(sequence<BlobPart> fileBits, USVString fileName, optional FilePropertyBag options),
-    ConstructorCallWith=ScriptExecutionContext,
     ExportMacro=WEBCORE_EXPORT,
     Exposed=(Window),
     JSGenerateToJSObject,
index 4dcd0dd..897155a 100644 (file)
@@ -68,7 +68,7 @@ FileReaderLoader::~FileReaderLoader()
 {
     terminate();
     if (!m_urlForReading.isEmpty())
-        ThreadableBlobRegistry::unregisterBlobURL(*m_sessionID, m_urlForReading);
+        ThreadableBlobRegistry::unregisterBlobURL(m_urlForReading);
 }
 
 void FileReaderLoader::start(ScriptExecutionContext* scriptExecutionContext, Blob& blob)
@@ -81,8 +81,7 @@ void FileReaderLoader::start(ScriptExecutionContext* scriptExecutionContext, Blo
         failed(FileError::SECURITY_ERR);
         return;
     }
-    m_sessionID = scriptExecutionContext->sessionID();
-    ThreadableBlobRegistry::registerBlobURL(*m_sessionID, scriptExecutionContext->securityOrigin(), m_urlForReading, blob.url());
+    ThreadableBlobRegistry::registerBlobURL(scriptExecutionContext->securityOrigin(), m_urlForReading, blob.url());
 
     // Construct and load the request.
     ResourceRequest request(m_urlForReading);
index 419b209..ffa8036 100644 (file)
@@ -103,7 +103,6 @@ private:
     String m_dataType;
 
     URL m_urlForReading;
-    Optional<PAL::SessionID> m_sessionID;
     RefPtr<ThreadableLoader> m_loader;
 
     RefPtr<JSC::ArrayBuffer> m_rawData;
index a95b249..272530b 100644 (file)
@@ -64,67 +64,67 @@ static ThreadSpecific<BlobUrlOriginMap>& originMap()
     return *map;
 }
 
-void ThreadableBlobRegistry::registerFileBlobURL(PAL::SessionID sessionID, const URL& url, const String& path, const String& contentType)
+void ThreadableBlobRegistry::registerFileBlobURL(const URL& url, const String& path, const String& contentType)
 {
     if (isMainThread()) {
-        blobRegistry().registerFileBlobURL(sessionID, url, BlobDataFileReference::create(path), contentType);
+        blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create(path), contentType);
         return;
     }
 
-    callOnMainThread([sessionID, url = url.isolatedCopy(), path = path.isolatedCopy(), contentType = contentType.isolatedCopy()] {
-        blobRegistry().registerFileBlobURL(sessionID, url, BlobDataFileReference::create(path), contentType);
+    callOnMainThread([url = url.isolatedCopy(), path = path.isolatedCopy(), contentType = contentType.isolatedCopy()] {
+        blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create(path), contentType);
     });
 }
 
-void ThreadableBlobRegistry::registerBlobURL(PAL::SessionID sessionID, const URL& url, Vector<BlobPart>&& blobParts, const String& contentType)
+void ThreadableBlobRegistry::registerBlobURL(const URL& url, Vector<BlobPart>&& blobParts, const String& contentType)
 {
     if (isMainThread()) {
-        blobRegistry().registerBlobURL(sessionID, url, WTFMove(blobParts), contentType);
+        blobRegistry().registerBlobURL(url, WTFMove(blobParts), contentType);
         return;
     }
     for (auto& part : blobParts)
         part.detachFromCurrentThread();
-    callOnMainThread([sessionID, url = url.isolatedCopy(), blobParts = WTFMove(blobParts), contentType = contentType.isolatedCopy()]() mutable {
-        blobRegistry().registerBlobURL(sessionID, url, WTFMove(blobParts), contentType);
+    callOnMainThread([url = url.isolatedCopy(), blobParts = WTFMove(blobParts), contentType = contentType.isolatedCopy()]() mutable {
+        blobRegistry().registerBlobURL(url, WTFMove(blobParts), contentType);
     });
 }
 
-void ThreadableBlobRegistry::registerBlobURL(PAL::SessionID sessionID, SecurityOrigin* origin, const URL& url, const URL& srcURL)
+void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, const URL& url, const URL& srcURL)
 {
     // If the blob URL contains null origin, as in the context with unique security origin or file URL, save the mapping between url and origin so that the origin can be retrived when doing security origin check.
     if (origin && BlobURL::getOrigin(url) == "null")
         originMap()->add(url.string(), origin);
 
     if (isMainThread()) {
-        blobRegistry().registerBlobURL(sessionID, url, srcURL);
+        blobRegistry().registerBlobURL(url, srcURL);
         return;
     }
 
-    callOnMainThread([sessionID, url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy()] {
-        blobRegistry().registerBlobURL(sessionID, url, srcURL);
+    callOnMainThread([url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy()] {
+        blobRegistry().registerBlobURL(url, srcURL);
     });
 }
 
-void ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(PAL::SessionID sessionID, const URL& url, const URL& srcURL, const String& fileBackedPath, const String& contentType)
+void ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, const String& fileBackedPath, const String& contentType)
 {
     if (isMainThread()) {
-        blobRegistry().registerBlobURLOptionallyFileBacked(sessionID, url, srcURL, BlobDataFileReference::create(fileBackedPath), contentType);
+        blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReference::create(fileBackedPath), contentType);
         return;
     }
-    callOnMainThread([sessionID, url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy(), fileBackedPath = fileBackedPath.isolatedCopy(), contentType = contentType.isolatedCopy()] {
-        blobRegistry().registerBlobURLOptionallyFileBacked(sessionID, url, srcURL, BlobDataFileReference::create(fileBackedPath), contentType);
+    callOnMainThread([url = url.isolatedCopy(), srcURL = srcURL.isolatedCopy(), fileBackedPath = fileBackedPath.isolatedCopy(), contentType = contentType.isolatedCopy()] {
+        blobRegistry().registerBlobURLOptionallyFileBacked(url, srcURL, BlobDataFileReference::create(fileBackedPath), contentType);
     });
 }
 
-void ThreadableBlobRegistry::registerBlobURLForSlice(PAL::SessionID sessionID, const URL& newURL, const URL& srcURL, long long start, long long end)
+void ThreadableBlobRegistry::registerBlobURLForSlice(const URL& newURL, const URL& srcURL, long long start, long long end)
 {
     if (isMainThread()) {
-        blobRegistry().registerBlobURLForSlice(sessionID, newURL, srcURL, start, end);
+        blobRegistry().registerBlobURLForSlice(newURL, srcURL, start, end);
         return;
     }
 
-    callOnMainThread([sessionID, newURL = newURL.isolatedCopy(), srcURL = srcURL.isolatedCopy(), start, end] {
-        blobRegistry().registerBlobURLForSlice(sessionID, newURL, srcURL, start, end);
+    callOnMainThread([newURL = newURL.isolatedCopy(), srcURL = srcURL.isolatedCopy(), start, end] {
+        blobRegistry().registerBlobURLForSlice(newURL, srcURL, start, end);
     });
 }
 
@@ -143,17 +143,17 @@ unsigned long long ThreadableBlobRegistry::blobSize(const URL& url)
     return resultSize;
 }
 
-void ThreadableBlobRegistry::unregisterBlobURL(PAL::SessionID sessionID, const URL& url)
+void ThreadableBlobRegistry::unregisterBlobURL(const URL& url)
 {
     if (BlobURL::getOrigin(url) == "null")
         originMap()->remove(url.string());
 
     if (isMainThread()) {
-        blobRegistry().unregisterBlobURL(sessionID, url);
+        blobRegistry().unregisterBlobURL(url);
         return;
     }
-    callOnMainThread([sessionID, url = url.isolatedCopy()] {
-        blobRegistry().unregisterBlobURL(sessionID, url);
+    callOnMainThread([url = url.isolatedCopy()] {
+        blobRegistry().unregisterBlobURL(url);
     });
 }
 
index a160acc..9795b21 100644 (file)
@@ -44,12 +44,12 @@ class SecurityOrigin;
 
 class ThreadableBlobRegistry {
 public:
-    static void registerFileBlobURL(PAL::SessionID, const URL&, const String& path, const String& contentType);
-    static void registerBlobURL(PAL::SessionID, const URL&, Vector<BlobPart>&& blobParts, const String& contentType);
-    static void registerBlobURL(PAL::SessionID, SecurityOrigin*, const URL&, const URL& srcURL);
-    static void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType);
-    static void registerBlobURLForSlice(PAL::SessionID, const URL& newURL, const URL& srcURL, long long start, long long end);
-    static void unregisterBlobURL(PAL::SessionID, const URL&);
+    static void registerFileBlobURL(const URL&, const String& path, const String& contentType);
+    static void registerBlobURL(const URL&, Vector<BlobPart>&& blobParts, const String& contentType);
+    static void registerBlobURL(SecurityOrigin*, const URL&, const URL& srcURL);
+    static void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType);
+    static void registerBlobURLForSlice(const URL& newURL, const URL& srcURL, long long start, long long end);
+    static void unregisterBlobURL(const URL&);
 
     static unsigned long long blobSize(const URL&);
 
index b14d310..f00a3ec 100644 (file)
@@ -175,7 +175,7 @@ bool FileInputType::appendFormData(DOMFormData& formData, bool multipart) const
     // If no filename at all is entered, return successful but empty.
     // Null would be more logical, but Netscape posts an empty file. Argh.
     if (fileList->isEmpty()) {
-        formData.append(name, File::create(element()->document().sessionID(), emptyString()));
+        formData.append(name, File::create(emptyString()));
         return true;
     }
 
@@ -414,7 +414,7 @@ void FileInputType::filesChosen(const Vector<FileChooserFileInfo>& paths, const
 
     auto shouldResolveDirectories = allowsDirectories() ? FileListCreator::ShouldResolveDirectories::Yes : FileListCreator::ShouldResolveDirectories::No;
     auto shouldRequestIcon = icon ? RequestIcon::Yes : RequestIcon::No;
-    m_fileListCreator = FileListCreator::create(element()->document().sessionID(), paths, shouldResolveDirectories, [this, shouldRequestIcon](Ref<FileList>&& fileList) {
+    m_fileListCreator = FileListCreator::create(paths, shouldResolveDirectories, [this, shouldRequestIcon](Ref<FileList>&& fileList) {
         setFiles(WTFMove(fileList), shouldRequestIcon);
         m_fileListCreator = nullptr;
     });
index 874684f..dc6285b 100644 (file)
@@ -39,7 +39,7 @@ FileListCreator::~FileListCreator()
     ASSERT(!m_completionHander);
 }
 
-static void appendDirectoryFiles(PAL::SessionID sessionID, const String& directory, const String& relativePath, Vector<Ref<File>>& fileObjects)
+static void appendDirectoryFiles(const String& directory, const String& relativePath, Vector<Ref<File>>& fileObjects)
 {
     for (auto& childPath : FileSystem::listDirectory(directory, "*")) {
         auto metadata = FileSystem::fileMetadata(childPath);
@@ -51,22 +51,22 @@ static void appendDirectoryFiles(PAL::SessionID sessionID, const String& directo
 
         String childRelativePath = relativePath + "/" + FileSystem::pathGetFileName(childPath);
         if (metadata.value().type == FileMetadata::Type::Directory)
-            appendDirectoryFiles(sessionID, childPath, childRelativePath, fileObjects);
+            appendDirectoryFiles(childPath, childRelativePath, fileObjects);
         else if (metadata.value().type == FileMetadata::Type::File)
-            fileObjects.append(File::createWithRelativePath(sessionID, childPath, childRelativePath));
+            fileObjects.append(File::createWithRelativePath(childPath, childRelativePath));
     }
 }
 
-FileListCreator::FileListCreator(PAL::SessionID sessionID, const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories shouldResolveDirectories, CompletionHandler&& completionHandler)
+FileListCreator::FileListCreator(const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories shouldResolveDirectories, CompletionHandler&& completionHandler)
 {
     if (shouldResolveDirectories == ShouldResolveDirectories::No)
-        completionHandler(createFileList<ShouldResolveDirectories::No>(sessionID, paths));
+        completionHandler(createFileList<ShouldResolveDirectories::No>(paths));
     else {
         // Resolve directories on a background thread to avoid blocking the main thread.
         m_completionHander = WTFMove(completionHandler);
         m_workQueue = WorkQueue::create("FileListCreator Work Queue");
-        m_workQueue->dispatch([this, protectedThis = makeRef(*this), sessionID, paths = crossThreadCopy(paths)]() mutable {
-            auto fileList = createFileList<ShouldResolveDirectories::Yes>(sessionID, paths);
+        m_workQueue->dispatch([this, protectedThis = makeRef(*this), paths = crossThreadCopy(paths)]() mutable {
+            auto fileList = createFileList<ShouldResolveDirectories::Yes>(paths);
             callOnMainThread([this, protectedThis = WTFMove(protectedThis), fileList = WTFMove(fileList)]() mutable {
                 if (auto completionHander = WTFMove(m_completionHander))
                     completionHander(WTFMove(fileList));
@@ -76,14 +76,14 @@ FileListCreator::FileListCreator(PAL::SessionID sessionID, const Vector<FileChoo
 }
 
 template<FileListCreator::ShouldResolveDirectories shouldResolveDirectories>
-Ref<FileList> FileListCreator::createFileList(PAL::SessionID sessionID, const Vector<FileChooserFileInfo>& paths)
+Ref<FileList> FileListCreator::createFileList(const Vector<FileChooserFileInfo>& paths)
 {
     Vector<Ref<File>> fileObjects;
     for (auto& info : paths) {
         if (shouldResolveDirectories == ShouldResolveDirectories::Yes && FileSystem::fileIsDirectory(info.path, FileSystem::ShouldFollowSymbolicLinks::No))
-            appendDirectoryFiles(sessionID, info.path, FileSystem::pathGetFileName(info.path), fileObjects);
+            appendDirectoryFiles(info.path, FileSystem::pathGetFileName(info.path), fileObjects);
         else
-            fileObjects.append(File::create(sessionID, info.path, info.displayName));
+            fileObjects.append(File::create(info.path, info.displayName));
     }
     return FileList::create(WTFMove(fileObjects));
 }
index 8637543..3c8b94d 100644 (file)
@@ -42,9 +42,9 @@ public:
     using CompletionHandler = Function<void(Ref<FileList>&&)>;
 
     enum class ShouldResolveDirectories { No, Yes };
-    static Ref<FileListCreator> create(PAL::SessionID sessionID, const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories shouldResolveDirectories, CompletionHandler&& completionHandler)
+    static Ref<FileListCreator> create(const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories shouldResolveDirectories, CompletionHandler&& completionHandler)
     {
-        return adoptRef(*new FileListCreator(sessionID, paths, shouldResolveDirectories, WTFMove(completionHandler)));
+        return adoptRef(*new FileListCreator(paths, shouldResolveDirectories, WTFMove(completionHandler)));
     }
 
     ~FileListCreator();
@@ -52,10 +52,10 @@ public:
     void cancel();
 
 private:
-    FileListCreator(PAL::SessionID, const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories, CompletionHandler&&);
+    FileListCreator(const Vector<FileChooserFileInfo>& paths, ShouldResolveDirectories, CompletionHandler&&);
 
     template<ShouldResolveDirectories shouldResolveDirectories>
-    static Ref<FileList> createFileList(PAL::SessionID, const Vector<FileChooserFileInfo>&);
+    static Ref<FileList> createFileList(const Vector<FileChooserFileInfo>&);
 
     RefPtr<WorkQueue> m_workQueue;
     CompletionHandler m_completionHander;
index 250fb77..fcfa784 100644 (file)
@@ -246,7 +246,7 @@ void HTMLAttachmentElement::updateEnclosingImageWithData(const String& contentTy
     if (!mimeTypeIsSuitableForInlineImageAttachment(mimeType))
         return;
 
-    hostElement->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document(), Blob::create(document().sessionID(), WTFMove(data), mimeType)));
+    hostElement->setAttributeWithoutSynchronization(HTMLNames::srcAttr, DOMURL::createObjectURL(document(), Blob::create(WTFMove(data), mimeType)));
 }
 
 } // namespace WebCore
index 2014efe..9cfbdb8 100644 (file)
@@ -732,7 +732,7 @@ ExceptionOr<void> HTMLCanvasElement::toBlob(ScriptExecutionContext& context, Ref
         RefPtr<Blob> blob;
         Vector<uint8_t> blobData = data(*imageData, encodingMIMEType, quality);
         if (!blobData.isEmpty())
-            blob = Blob::create(context.sessionID(), WTFMove(blobData), encodingMIMEType);
+            blob = Blob::create(WTFMove(blobData), encodingMIMEType);
         callback->scheduleCallback(context, WTFMove(blob));
         return { };
     }
@@ -743,7 +743,7 @@ ExceptionOr<void> HTMLCanvasElement::toBlob(ScriptExecutionContext& context, Ref
     RefPtr<Blob> blob;
     Vector<uint8_t> blobData = buffer()->toData(encodingMIMEType, quality);
     if (!blobData.isEmpty())
-        blob = Blob::create(context.sessionID(), WTFMove(blobData), encodingMIMEType);
+        blob = Blob::create(WTFMove(blobData), encodingMIMEType);
     callback->scheduleCallback(context, WTFMove(blob));
     return { };
 }
index b668da1..d2f96d4 100644 (file)
@@ -60,7 +60,7 @@ void PublicURLManager::revoke(const URL& url)
 {
     for (auto& registry : m_registryToURL) {
         if (registry.value.contains(url.string())) {
-            registry.key->unregisterURL(*scriptExecutionContext(), url);
+            registry.key->unregisterURL(url);
             registry.value.remove(url.string());
             break;
         }
@@ -75,7 +75,7 @@ void PublicURLManager::stop()
     m_isStopped = true;
     for (auto& registry : m_registryToURL) {
         for (auto& url : registry.value)
-            registry.key->unregisterURL(*scriptExecutionContext(), URL({ }, url));
+            registry.key->unregisterURL(URL({ }, url));
     }
 
     m_registryToURL.clear();
index e3dc46a..22fe815 100644 (file)
@@ -48,7 +48,7 @@ class URLRegistry {
 public:
     virtual ~URLRegistry() = default;
     virtual void registerURL(ScriptExecutionContext&, const URL&, URLRegistrable&) = 0;
-    virtual void unregisterURL(ScriptExecutionContext&, const URL&) = 0;
+    virtual void unregisterURL(const URL&) = 0;
 
     // This is an optional API
     virtual URLRegistrable* lookup(const String&) const { ASSERT_NOT_REACHED(); return 0; }
index 5363703..8b91e1c 100644 (file)
@@ -106,11 +106,10 @@ CompletionHandlerCallingScope PolicyChecker::extendBlobURLLifetimeIfNecessary(Re
 
     // Create a new temporary blobURL in case this one gets revoked during the asynchronous navigation policy decision.
     URL temporaryBlobURL = BlobURL::createPublicURL(&m_frame.document()->securityOrigin());
-    auto sessionID = m_frame.document()->sessionID();
-    blobRegistry().registerBlobURL(sessionID, temporaryBlobURL, request.url());
+    blobRegistry().registerBlobURL(temporaryBlobURL, request.url());
     request.setURL(temporaryBlobURL);
-    return CompletionHandler<void()>([sessionID, temporaryBlobURL = WTFMove(temporaryBlobURL)] {
-        blobRegistry().unregisterBlobURL(sessionID, temporaryBlobURL);
+    return CompletionHandler<void()>([temporaryBlobURL = WTFMove(temporaryBlobURL)] {
+        blobRegistry().unregisterBlobURL(temporaryBlobURL);
     });
 }
 
index 106c80b..0af28d6 100644 (file)
@@ -3768,7 +3768,7 @@ bool EventHandler::handleDrag(const MouseEventWithHitTestResults& event, CheckDr
     // This does work only if we missed a dragEnd. Do it anyway, just to make sure the old dataTransfer gets numbed.
     invalidateDataTransfer();
 
-    dragState().dataTransfer = DataTransfer::createForDrag(*m_frame.document());
+    dragState().dataTransfer = DataTransfer::createForDrag();
     HasNonDefaultPasteboardData hasNonDefaultPasteboardData = HasNonDefaultPasteboardData::No;
     
     if (dragState().shouldDispatchEvents) {
index 660a796..fe91e81 100644 (file)
@@ -31,7 +31,6 @@
 
 #pragma once
 
-#include <pal/SessionID.h>
 #include <wtf/Forward.h>
 
 namespace WebCore {
@@ -48,25 +47,25 @@ class WEBCORE_EXPORT BlobRegistry {
 public:
 
     // Registers a blob URL referring to the specified file.
-    virtual void registerFileBlobURL(PAL::SessionID, const URL&, Ref<BlobDataFileReference>&&, const String& contentType) = 0;
+    virtual void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) = 0;
 
     // Registers a blob URL referring to the specified blob data.
-    virtual void registerBlobURL(PAL::SessionID, const URL&, Vector<BlobPart>&&, const String& contentType) = 0;
+    virtual void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType) = 0;
     
     // Registers a new blob URL referring to the blob data identified by the specified srcURL.
-    virtual void registerBlobURL(PAL::SessionID, const URL&, const URL& srcURL) = 0;
+    virtual void registerBlobURL(const URL&, const URL& srcURL) = 0;
 
     // Registers a new blob URL referring to the blob data identified by the specified srcURL or, if none found, referring to the file found at the given path.
-    virtual void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) = 0;
+    virtual void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) = 0;
 
     // Negative start and end values select from the end.
-    virtual void registerBlobURLForSlice(PAL::SessionID, const URL&, const URL& srcURL, long long start, long long end) = 0;
+    virtual void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) = 0;
 
-    virtual void unregisterBlobURL(PAL::SessionID, const URL&) = 0;
+    virtual void unregisterBlobURL(const URL&) = 0;
 
     virtual unsigned long long blobSize(const URL&) = 0;
 
-    virtual void writeBlobsToTemporaryFiles(PAL::SessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) = 0;
+    virtual void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) = 0;
 
     virtual BlobRegistryImpl* blobRegistryImpl() { return nullptr; }
 
index b879612..cb3fdd5 100644 (file)
@@ -4263,7 +4263,7 @@ RefPtr<File> Internals::createFile(const String& path)
     if (!url.isLocalFile())
         return nullptr;
 
-    return File::create(document->sessionID(), url.fileSystemPath());
+    return File::create(url.fileSystemPath());
 }
 
 void Internals::queueMicroTask(int testNumber)
index 6e1bca3..5544561 100644 (file)
@@ -68,14 +68,14 @@ Ref<FetchEvent> ServiceWorkerInternals::createBeingDispatchedFetchEvent(ScriptEx
 
 Ref<FetchResponse> ServiceWorkerInternals::createOpaqueWithBlobBodyResponse(ScriptExecutionContext& context)
 {
-    auto blob = Blob::create(context.sessionID());
+    auto blob = Blob::create();
     auto formData = FormData::create();
     formData->appendBlob(blob->url());
 
     ResourceResponse response;
     response.setType(ResourceResponse::Type::Cors);
     response.setTainting(ResourceResponse::Tainting::Opaque);
-    auto fetchResponse = FetchResponse::create(context, FetchBody::fromFormData(context.sessionID(), formData), FetchHeaders::Guard::Response, WTFMove(response));
+    auto fetchResponse = FetchResponse::create(context, FetchBody::fromFormData(formData), FetchHeaders::Guard::Response, WTFMove(response));
     fetchResponse->initializeOpaqueLoadIdentifierForTesting();
     return fetchResponse;
 }
index 20a2ada..44969af 100644 (file)
@@ -149,7 +149,7 @@ void dispatchFetchEvent(Ref<Client>&& client, ServiceWorkerGlobalScope& globalSc
     auto* formData = request.httpBody();
     Optional<FetchBody> body;
     if (formData && !formData->isEmpty()) {
-        body = FetchBody::fromFormData(globalScope.sessionID(), *formData);
+        body = FetchBody::fromFormData(*formData);
         if (!body) {
             client->didNotHandle();
             return;
index f5c6753..79bd461 100644 (file)
@@ -214,7 +214,7 @@ Ref<Blob> XMLHttpRequest::createResponseBlob()
         data.append(m_binaryResponseBuilder->data(), m_binaryResponseBuilder->size());
     m_binaryResponseBuilder = nullptr;
     String normalizedContentType = Blob::normalizedContentType(responseMIMEType()); // responseMIMEType defaults to text/xml which may be incorrect.
-    return Blob::create(scriptExecutionContext()->sessionID(), WTFMove(data), normalizedContentType);
+    return Blob::create(WTFMove(data), normalizedContentType);
 }
 
 RefPtr<ArrayBuffer> XMLHttpRequest::createResponseArrayBuffer()
index b16b6b0..0dc4796 100644 (file)
@@ -1,3 +1,23 @@
+2019-09-18  Chris Dumez  <cdumez@apple.com>
+
+        BlobRegistry no longer needs SessionIDs
+        https://bugs.webkit.org/show_bug.cgi?id=201936
+
+        Reviewed by Geoffrey Garen.
+
+        BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
+
+        * NetworkProcess/NetworkProcessPlatformStrategies.cpp:
+        (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry):
+        * WebProcess/FileAPI/BlobRegistryProxy.cpp:
+        (WebKit::BlobRegistryProxy::registerFileBlobURL):
+        (WebKit::BlobRegistryProxy::registerBlobURL):
+        (WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
+        (WebKit::BlobRegistryProxy::unregisterBlobURL):
+        (WebKit::BlobRegistryProxy::registerBlobURLForSlice):
+        (WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
+        * WebProcess/FileAPI/BlobRegistryProxy.h:
+
 2019-09-18  Benjamin Nham  <nham@apple.com>
 
         NetworkLoadParameters shouldn't store sessionID
index 0c846db..d4f8753 100644 (file)
@@ -52,14 +52,14 @@ BlobRegistry* NetworkProcessPlatformStrategies::createBlobRegistry()
 {
     using namespace WebCore;
     class EmptyBlobRegistry : public WebCore::BlobRegistry {
-        void registerFileBlobURL(PAL::SessionID, const URL&, Ref<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
-        void registerBlobURL(PAL::SessionID, const URL&, Vector<BlobPart>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
-        void registerBlobURL(PAL::SessionID, const URL&, const URL& srcURL) final { ASSERT_NOT_REACHED(); }
-        void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
-        void registerBlobURLForSlice(PAL::SessionID, const URL&, const URL& srcURL, long long start, long long end) final { ASSERT_NOT_REACHED(); }
-        void unregisterBlobURL(PAL::SessionID, const URL&) final { ASSERT_NOT_REACHED(); }
+        void registerFileBlobURL(const URL&, Ref<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURL(const URL&, Vector<BlobPart>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURL(const URL&, const URL& srcURL) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<BlobDataFileReference>&&, const String& contentType) final { ASSERT_NOT_REACHED(); }
+        void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) final { ASSERT_NOT_REACHED(); }
+        void unregisterBlobURL(const URL&) final { ASSERT_NOT_REACHED(); }
         unsigned long long blobSize(const URL&) final { ASSERT_NOT_REACHED(); return 0; }
-        void writeBlobsToTemporaryFiles(PAL::SessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final { ASSERT_NOT_REACHED(); }
+        void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final { ASSERT_NOT_REACHED(); }
     };
     static NeverDestroyed<EmptyBlobRegistry> blobRegistry;
     return &blobRegistry.get();
index eb630a0..8f47b8f 100644 (file)
@@ -36,7 +36,7 @@
 namespace WebKit {
 using namespace WebCore;
 
-void BlobRegistryProxy::registerFileBlobURL(PAL::SessionID, const URL& url, Ref<BlobDataFileReference>&& file, const String& contentType)
+void BlobRegistryProxy::registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& file, const String& contentType)
 {
     SandboxExtension::Handle extensionHandle;
 
@@ -47,28 +47,28 @@ void BlobRegistryProxy::registerFileBlobURL(PAL::SessionID, const URL& url, Ref<
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, file->path(), extensionHandle, contentType), 0);
 }
 
-void BlobRegistryProxy::registerBlobURL(PAL::SessionID, const URL& url, Vector<BlobPart>&& blobParts, const String& contentType)
+void BlobRegistryProxy::registerBlobURL(const URL& url, Vector<BlobPart>&& blobParts, const String& contentType)
 {
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURL(url, blobParts, contentType), 0);
 }
 
-void BlobRegistryProxy::registerBlobURL(PAL::SessionID, const URL& url, const URL& srcURL)
+void BlobRegistryProxy::registerBlobURL(const URL& url, const URL& srcURL)
 {
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLFromURL { url, srcURL }, 0);
 }
 
-void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL& url, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&& file, const String& contentType)
+void BlobRegistryProxy::registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&& file, const String& contentType)
 {
     ASSERT(file);
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLOptionallyFileBacked(url, srcURL, file->path(), contentType), 0);
 }
 
-void BlobRegistryProxy::unregisterBlobURL(PAL::SessionID, const URL& url)
+void BlobRegistryProxy::unregisterBlobURL(const URL& url)
 {
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::UnregisterBlobURL(url), 0);
 }
 
-void BlobRegistryProxy::registerBlobURLForSlice(PAL::SessionID, const URL& url, const URL& srcURL, long long start, long long end)
+void BlobRegistryProxy::registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end)
 {
     WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLForSlice(url, srcURL, start, end), 0);
 }
@@ -81,9 +81,8 @@ unsigned long long BlobRegistryProxy::blobSize(const URL& url)
     return resultSize;
 }
 
-void BlobRegistryProxy::writeBlobsToTemporaryFiles(PAL::SessionID sessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler)
+void BlobRegistryProxy::writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler)
 {
-    ASSERT_UNUSED(sessionID, sessionID == WebProcess::singleton().sessionID());
     WebProcess::singleton().ensureNetworkProcessConnection().writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler));
 }
 
index d766158..40984db 100644 (file)
@@ -31,14 +31,14 @@ namespace WebKit {
 
 class BlobRegistryProxy final : public WebCore::BlobRegistry {
 public:
-    void registerFileBlobURL(PAL::SessionID, const URL&, Ref<WebCore::BlobDataFileReference>&&, const String& contentType) final;
-    void registerBlobURL(PAL::SessionID, const URL&, Vector<WebCore::BlobPart>&&, const String& contentType) final;
-    void registerBlobURL(PAL::SessionID, const URL&, const URL& srcURL) final;
-    void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL&, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&&, const String& contentType) final;
-    void unregisterBlobURL(PAL::SessionID, const URL&) final;
-    void registerBlobURLForSlice(PAL::SessionID, const URL&, const URL& srcURL, long long start, long long end) final;
+    void registerFileBlobURL(const URL&, Ref<WebCore::BlobDataFileReference>&&, const String& contentType) final;
+    void registerBlobURL(const URL&, Vector<WebCore::BlobPart>&&, const String& contentType) final;
+    void registerBlobURL(const URL&, const URL& srcURL) final;
+    void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, RefPtr<WebCore::BlobDataFileReference>&&, const String& contentType) final;
+    void unregisterBlobURL(const URL&) final;
+    void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) final;
     unsigned long long blobSize(const URL&) final;
-    void writeBlobsToTemporaryFiles(PAL::SessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final;
+    void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final;
 };
 
 }
index 15d58bc..022b4ec 100644 (file)
@@ -1,5 +1,16 @@
 2019-09-18  Chris Dumez  <cdumez@apple.com>
 
+        BlobRegistry no longer needs SessionIDs
+        https://bugs.webkit.org/show_bug.cgi?id=201936
+
+        Reviewed by Geoffrey Garen.
+
+        BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
+
+        * WebCoreSupport/WebPlatformStrategies.mm:
+
+2019-09-18  Chris Dumez  <cdumez@apple.com>
+
         CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
         https://bugs.webkit.org/show_bug.cgi?id=201920
 
index def98da..f67720e 100644 (file)
@@ -64,14 +64,14 @@ PasteboardStrategy* WebPlatformStrategies::createPasteboardStrategy()
 
 class WebBlobRegistry final : public BlobRegistry {
 private:
-    void registerFileBlobURL(PAL::SessionID, const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }
-    void registerBlobURL(PAL::SessionID, const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); }
-    void registerBlobURL(PAL::SessionID, const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); }
-    void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType); }
-    void registerBlobURLForSlice(PAL::SessionID, const URL& url, const URL& srcURL, long long start, long long end) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end); }
-    void unregisterBlobURL(PAL::SessionID, const URL& url) final { m_blobRegistry.unregisterBlobURL(url); }
+    void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }
+    void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); }
+    void registerBlobURL(const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); }
+    void registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType); }
+    void registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end); }
+    void unregisterBlobURL(const URL& url) final { m_blobRegistry.unregisterBlobURL(url); }
     unsigned long long blobSize(const URL& url) final { return m_blobRegistry.blobSize(url); }
-    void writeBlobsToTemporaryFiles(PAL::SessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); }
+    void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); }
 
     BlobRegistryImpl* blobRegistryImpl() final { return &m_blobRegistry; }
 
index 6845d8e..3f79e8a 100644 (file)
@@ -1,3 +1,14 @@
+2019-09-18  Chris Dumez  <cdumez@apple.com>
+
+        BlobRegistry no longer needs SessionIDs
+        https://bugs.webkit.org/show_bug.cgi?id=201936
+
+        Reviewed by Geoffrey Garen.
+
+        BlobRegistry no longer needs SessionIDs, now that we have a single session per WebProcess.
+
+        * WebCoreSupport/WebPlatformStrategies.cpp:
+
 2019-09-16  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [WinCairo][curl] Don't compile unused CertificateCFWin.cpp
index b7690df..cce0c94 100644 (file)
@@ -62,14 +62,14 @@ PasteboardStrategy* WebPlatformStrategies::createPasteboardStrategy()
 
 class WebBlobRegistry final : public BlobRegistry {
 private:
-    void registerFileBlobURL(PAL::SessionID, const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }
-    void registerBlobURL(PAL::SessionID, const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); }
-    void registerBlobURL(PAL::SessionID, const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); }
-    void registerBlobURLOptionallyFileBacked(PAL::SessionID, const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType); }
-    void registerBlobURLForSlice(PAL::SessionID, const URL& url, const URL& srcURL, long long start, long long end) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end); }
-    void unregisterBlobURL(PAL::SessionID, const URL& url) final { m_blobRegistry.unregisterBlobURL(url); }
+    void registerFileBlobURL(const URL& url, Ref<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerFileBlobURL(url, WTFMove(reference), contentType); }
+    void registerBlobURL(const URL& url, Vector<BlobPart>&& parts, const String& contentType) final { m_blobRegistry.registerBlobURL(url, WTFMove(parts), contentType); }
+    void registerBlobURL(const URL& url, const URL& srcURL) final { m_blobRegistry.registerBlobURL(url, srcURL); }
+    void registerBlobURLOptionallyFileBacked(const URL& url, const URL& srcURL, RefPtr<BlobDataFileReference>&& reference, const String& contentType) final { m_blobRegistry.registerBlobURLOptionallyFileBacked(url, srcURL, WTFMove(reference), contentType); }
+    void registerBlobURLForSlice(const URL& url, const URL& srcURL, long long start, long long end) final { m_blobRegistry.registerBlobURLForSlice(url, srcURL, start, end); }
+    void unregisterBlobURL(const URL& url) final { m_blobRegistry.unregisterBlobURL(url); }
     unsigned long long blobSize(const URL& url) final { return m_blobRegistry.blobSize(url); }
-    void writeBlobsToTemporaryFiles(PAL::SessionID, const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); }
+    void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); }
 
     BlobRegistryImpl* blobRegistryImpl() final { return &m_blobRegistry; }