Changeset 280824 in webkit
- Timestamp:
- Aug 9, 2021 8:33:03 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 35 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke-expected.txt (modified) (1 diff)
-
LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html (modified) (1 diff)
-
LayoutTests/fast/files/blob-as-frame-url-expected.txt (added)
-
LayoutTests/fast/files/blob-as-frame-url.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-in-tags.window-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-reload.window-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inheritance/history.sub-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/Headers.cmake (modified) (1 diff)
-
Source/WebCore/WebCore.xcodeproj/project.pbxproj (modified) (1 diff)
-
Source/WebCore/bindings/js/SerializedScriptValue.cpp (modified) (7 diffs)
-
Source/WebCore/bindings/js/SerializedScriptValue.h (modified) (3 diffs)
-
Source/WebCore/fileapi/Blob.cpp (modified) (10 diffs)
-
Source/WebCore/fileapi/Blob.h (modified) (5 diffs)
-
Source/WebCore/fileapi/BlobURL.cpp (modified) (1 diff)
-
Source/WebCore/fileapi/BlobURL.h (modified) (1 diff)
-
Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (modified) (1 diff)
-
Source/WebCore/fileapi/ThreadableBlobRegistry.h (modified) (1 diff)
-
Source/WebCore/loader/PolicyChecker.cpp (modified) (3 diffs)
-
Source/WebCore/loader/PolicyChecker.h (modified) (2 diffs)
-
Source/WebCore/platform/network/BlobRegistry.h (modified) (1 diff)
-
Source/WebCore/platform/network/BlobRegistryImpl.cpp (modified) (7 diffs)
-
Source/WebCore/platform/network/BlobRegistryImpl.h (modified) (3 diffs)
-
Source/WebCore/xml/XMLHttpRequest.cpp (modified) (7 diffs)
-
Source/WebCore/xml/XMLHttpRequest.h (modified) (1 diff)
-
Source/WebKit/ChangeLog (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (modified) (1 diff)
-
Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp (modified) (1 diff)
-
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h (modified) (1 diff)
-
Source/WebKitLegacy/mac/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm (modified) (1 diff)
-
Source/WebKitLegacy/win/ChangeLog (modified) (1 diff)
-
Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r280822 r280824 1 2021-08-09 Chris Dumez <cdumez@apple.com> 2 3 Blob URL changes after loading it 4 https://bugs.webkit.org/show_bug.cgi?id=228923 5 6 Reviewed by Geoff Garen. 7 8 Add layout test coverage. 9 10 * fast/files/blob-as-frame-url-expected.txt: Added. 11 * fast/files/blob-as-frame-url.html: Added. 12 1 13 2021-08-09 Lauro Moura <lmoura@igalia.com> 2 14 -
trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke-expected.txt
r259900 r280824 1 CONSOLE MESSAGE: PASS: URL was revoked2 1 Download started. 3 2 Downloading URL with suggested filename "foo.txt" -
trunk/LayoutTests/fast/dom/HTMLAnchorElement/anchor-file-blob-download-then-revoke.html
r231714 r280824 24 24 // Revoke the URL right away. 25 25 window.URL.revokeObjectURL(link.href); 26 27 // Make sure the URL was revoked.28 xhr = new XMLHttpRequest();29 xhr.open("GET", link.href, false);30 try {31 xhr.send(null);32 } catch (e) {33 }34 if (xhr.status == 200)35 console.log("FAIL: URL was not revoked");36 else37 console.log("PASS: URL was revoked");38 26 } 39 27 runTest(); -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-in-tags.window-expected.txt
r267651 r280824 1 2 Harness Error (TIMEOUT), message = null3 1 4 2 PASS Blob URLs can be used in <script> tags 5 3 PASS Blob URLs can be used in iframes, and are treated same origin 6 TIMEOUT Blob URL fragment is implemented. Test timed out 4 PASS Blob URL fragment is implemented. 7 5 -
trunk/LayoutTests/imported/w3c/web-platform-tests/FileAPI/url/url-reload.window-expected.txt
r263059 r280824 2 2 Harness Error (TIMEOUT), message = null 3 3 4 TIMEOUT Reloading a blob URL succeeds. Test timed out 4 PASS Reloading a blob URL succeeds. 5 5 TIMEOUT Reloading a blob URL succeeds even if the URL was revoked. Test timed out 6 6 -
trunk/LayoutTests/imported/w3c/web-platform-tests/content-security-policy/inheritance/history.sub-expected.txt
r279838 r280824 2 2 PASS History navigation: "about:blank" document is navigated back from history same-origin. 3 3 PASS History navigation: "about:blank" document is navigated back from history cross-origin. 4 FAIL History navigation: blob URL document is navigated back from history same-origin. step_wait_func: Wait for the popup to navigate. Timed out waiting on condition5 FAIL History navigation: blob URL document is navigated back from history cross-origin. step_wait_func: Wait for the popup to navigate. Timed out waiting on condition6 FAIL History navigation: blob URL document is navigated back from history (without bfcache on Firefox) same-origin. step_wait_func: Wait for the popup to navigate. Timed out waiting on condition7 FAIL History navigation: blob URL document is navigated back from history (without bfcache on Firefox) cross-origin. step_wait_func: Wait for the popup to navigate. Timed out waiting on condition4 FAIL History navigation: blob URL document is navigated back from history same-origin. assert_equals: Image should be blocked by CSP inherited from navigation initiator. expected "img blocked" but got "img loaded" 5 FAIL History navigation: blob URL document is navigated back from history cross-origin. assert_equals: Image should be blocked by CSP inherited from navigation initiator. expected "img blocked" but got "img loaded" 6 FAIL History navigation: blob URL document is navigated back from history (without bfcache on Firefox) same-origin. assert_equals: Image should be blocked by CSP inherited from navigation initiator. expected "img blocked" but got "img loaded" 7 FAIL History navigation: blob URL document is navigated back from history (without bfcache on Firefox) cross-origin. assert_equals: Image should be blocked by CSP inherited from navigation initiator. expected "img blocked" but got "img loaded" 8 8 -
trunk/Source/WebCore/ChangeLog
r280807 r280824 1 2021-08-09 Chris Dumez <cdumez@apple.com> 2 3 Blob URL changes after loading it 4 https://bugs.webkit.org/show_bug.cgi?id=228923 5 6 Reviewed by Geoff Garen. 7 8 Blob URL changes after loading it. This is because we use URLWithBlobURLLifetimeExtension to 9 extend the lifetime of the Blob URL during the load and URLWithBlobURLLifetimeExtension ends 10 up creating a new public Blob URL. This is Web-observable so we need a way to extend the 11 lifetime of a Blob URL without actually generating a new Blob URL. 12 13 This patch replaces URLWithBlobURLLifetimeExtension with a new BlobURLHandle class which 14 extends the lifetime of a Blob URL as long as there are BlobURLHandle objects referring 15 to it. BlobURLHandle works with both private and public Blob URLs so it replaces 16 Blob::Handle as well (which I recently introduced via r280547). The Blob URL no longer 17 changes when we extend its lifetime. Instead, the Blob registry now keeps track of 18 references to a given Blob and only removes a Blob URL once there are no longer any 19 references to it. 20 21 Test: fast/files/blob-as-frame-url.html 22 23 * Headers.cmake: 24 * WebCore.xcodeproj/project.pbxproj: 25 * bindings/js/SerializedScriptValue.cpp: 26 (WebCore::CloneSerializer::serialize): 27 (WebCore::CloneSerializer::CloneSerializer): 28 (WebCore::CloneSerializer::dumpIfTerminal): 29 (WebCore::SerializedScriptValue::SerializedScriptValue): 30 (WebCore::SerializedScriptValue::create): 31 * bindings/js/SerializedScriptValue.h: 32 (WebCore::SerializedScriptValue::blobHandles const): 33 (WebCore::SerializedScriptValue::SerializedScriptValue): 34 * fileapi/Blob.cpp: 35 (WebCore::Blob::Blob): 36 (WebCore::Blob::slice const): 37 (WebCore::Blob::size const): 38 (WebCore::Blob::handle const): 39 * fileapi/Blob.h: 40 (WebCore::Blob::url const): 41 * fileapi/BlobURL.cpp: 42 (WebCore::BlobURLHandle::BlobURLHandle): 43 (WebCore::BlobURLHandle::~BlobURLHandle): 44 (WebCore::BlobURLHandle::registerBlobURLHandleIfNecessary): 45 (WebCore::BlobURLHandle::unregisterBlobURLHandleIfNecessary): 46 (WebCore::BlobURLHandle::operator=): 47 (WebCore::BlobURLHandle::clear): 48 * fileapi/BlobURL.h: 49 (WebCore::BlobURLHandle::BlobURLHandle): 50 (WebCore::BlobURLHandle::url const): 51 * fileapi/ThreadableBlobRegistry.cpp: 52 (WebCore::ThreadableBlobRegistry::registerBlobURLHandle): 53 (WebCore::ThreadableBlobRegistry::unregisterBlobURLHandle): 54 * fileapi/ThreadableBlobRegistry.h: 55 * loader/PolicyChecker.cpp: 56 (WebCore::FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary const): 57 (WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy): 58 (WebCore::FrameLoader::PolicyChecker::checkNewWindowPolicy): 59 * loader/PolicyChecker.h: 60 * platform/network/BlobRegistry.h: 61 * platform/network/BlobRegistryImpl.cpp: 62 (WebCore::BlobRegistryImpl::registerFileBlobURL): 63 (WebCore::BlobRegistryImpl::registerBlobURL): 64 (WebCore::BlobRegistryImpl::registerBlobURLOptionallyFileBacked): 65 (WebCore::BlobRegistryImpl::registerBlobURLForSlice): 66 (WebCore::BlobRegistryImpl::unregisterBlobURL): 67 (WebCore::BlobRegistryImpl::addBlobData): 68 (WebCore::BlobRegistryImpl::registerBlobURLHandle): 69 (WebCore::BlobRegistryImpl::unregisterBlobURLHandle): 70 * platform/network/BlobRegistryImpl.h: 71 * xml/XMLHttpRequest.cpp: 72 (WebCore::XMLHttpRequest::setResponseType): 73 (WebCore::XMLHttpRequest::open): 74 (WebCore::XMLHttpRequest::prepareToSend): 75 (WebCore::XMLHttpRequest::send): 76 (WebCore::XMLHttpRequest::createRequest): 77 (WebCore::XMLHttpRequest::clearRequest): 78 (WebCore::XMLHttpRequest::didFinishLoading): 79 * xml/XMLHttpRequest.h: 80 1 81 2021-08-09 Simon Fraser <simon.fraser@apple.com> 2 82 -
trunk/Source/WebCore/Headers.cmake
r280504 r280824 599 599 fileapi/Blob.h 600 600 fileapi/BlobPropertyBag.h 601 fileapi/BlobURL.h 601 602 fileapi/EndingType.h 602 603 fileapi/File.h -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r280758 r280824 3038 3038 976D6C79122B8A3D001FD1F7 /* Blob.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C5A122B8A3D001FD1F7 /* Blob.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3039 3039 976D6C7C122B8A3D001FD1F7 /* BlobBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C5D122B8A3D001FD1F7 /* BlobBuilder.h */; }; 3040 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C60122B8A3D001FD1F7 /* BlobURL.h */; };3040 976D6C7F122B8A3D001FD1F7 /* BlobURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C60122B8A3D001FD1F7 /* BlobURL.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3041 3041 976D6C81122B8A3D001FD1F7 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C62122B8A3D001FD1F7 /* File.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3042 3042 976D6C86122B8A3D001FD1F7 /* FileList.h in Headers */ = {isa = PBXBuildFile; fileRef = 976D6C67122B8A3D001FD1F7 /* FileList.h */; settings = {ATTRIBUTES = (Private, ); }; }; -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp
r280547 r280824 601 601 WasmMemoryHandleArray& wasmMemoryHandles, 602 602 #endif 603 Vector<Blob ::Handle>& blobHandles, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers)603 Vector<BlobURLHandle>& blobHandles, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers) 604 604 { 605 605 CloneSerializer serializer(lexicalGlobalObject, messagePorts, arrayBuffers, imageBitmaps, … … 648 648 WasmMemoryHandleArray& wasmMemoryHandles, 649 649 #endif 650 Vector<Blob ::Handle>& blobHandles, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers)650 Vector<BlobURLHandle>& blobHandles, Vector<uint8_t>& out, SerializationContext context, ArrayBufferContentsArray& sharedBuffers) 651 651 : CloneBase(lexicalGlobalObject) 652 652 , m_buffer(out) … … 1298 1298 write(CryptoKeyTag); 1299 1299 Vector<uint8_t> serializedKey; 1300 Vector<Blob ::Handle> dummyBlobHandles;1300 Vector<BlobURLHandle> dummyBlobHandles; 1301 1301 Vector<RefPtr<MessagePort>> dummyMessagePorts; 1302 1302 Vector<RefPtr<JSC::ArrayBuffer>> dummyArrayBuffers; … … 1761 1761 1762 1762 Vector<uint8_t>& m_buffer; 1763 Vector<Blob ::Handle>& m_blobHandles;1763 Vector<BlobURLHandle>& m_blobHandles; 1764 1764 ObjectPool m_objectPool; 1765 1765 ObjectPool m_transferredMessagePorts; … … 3916 3916 } 3917 3917 3918 SerializedScriptValue::SerializedScriptValue(Vector<uint8_t>&& buffer, const Vector<Blob ::Handle>& blobHandles, std::unique_ptr<ArrayBufferContentsArray> arrayBufferContentsArray, std::unique_ptr<ArrayBufferContentsArray> sharedBufferContentsArray, Vector<std::optional<ImageBitmapBacking>>&& backingStores3918 SerializedScriptValue::SerializedScriptValue(Vector<uint8_t>&& buffer, const Vector<BlobURLHandle>& blobHandles, std::unique_ptr<ArrayBufferContentsArray> arrayBufferContentsArray, std::unique_ptr<ArrayBufferContentsArray> sharedBufferContentsArray, Vector<std::optional<ImageBitmapBacking>>&& backingStores 3919 3919 #if ENABLE(OFFSCREEN_CANVAS_IN_WORKERS) 3920 3920 , Vector<std::unique_ptr<DetachedOffscreenCanvas>>&& detachedOffscreenCanvases … … 4066 4066 { 4067 4067 Vector<uint8_t> buffer; 4068 Vector<Blob ::Handle> blobHandles;4068 Vector<BlobURLHandle> blobHandles; 4069 4069 Vector<RefPtr<MessagePort>> dummyMessagePorts; 4070 4070 Vector<RefPtr<ImageBitmap>> dummyImageBitmaps; … … 4218 4218 4219 4219 Vector<uint8_t> buffer; 4220 Vector<Blob ::Handle> blobHandles;4220 Vector<BlobURLHandle> blobHandles; 4221 4221 #if ENABLE(WEBASSEMBLY) 4222 4222 WasmModuleArray wasmModules; -
trunk/Source/WebCore/bindings/js/SerializedScriptValue.h
r280547 r280824 100 100 101 101 Vector<String> blobURLs() const; 102 const Vector<Blob ::Handle>& blobHandles() const { return m_blobHandles; }102 const Vector<BlobURLHandle>& blobHandles() const { return m_blobHandles; } 103 103 void writeBlobsToDiskForIndexedDB(CompletionHandler<void(IDBValue&&)>&&); 104 104 IDBValue writeBlobsToDiskForIndexedDBSynchronously(); … … 124 124 ); 125 125 126 SerializedScriptValue(Vector<unsigned char>&&, const Vector<Blob ::Handle>& blobHandles, std::unique_ptr<ArrayBufferContentsArray>, std::unique_ptr<ArrayBufferContentsArray> sharedBuffers, Vector<std::optional<ImageBitmapBacking>>&& backingStores126 SerializedScriptValue(Vector<unsigned char>&&, const Vector<BlobURLHandle>& blobHandles, std::unique_ptr<ArrayBufferContentsArray>, std::unique_ptr<ArrayBufferContentsArray> sharedBuffers, Vector<std::optional<ImageBitmapBacking>>&& backingStores 127 127 #if ENABLE(OFFSCREEN_CANVAS_IN_WORKERS) 128 128 , Vector<std::unique_ptr<DetachedOffscreenCanvas>>&& = { } … … 153 153 std::unique_ptr<WasmMemoryHandleArray> m_wasmMemoryHandlesArray; 154 154 #endif 155 Vector<Blob ::Handle> m_blobHandles;155 Vector<BlobURLHandle> m_blobHandles; 156 156 size_t m_memoryCost { 0 }; 157 157 }; -
trunk/Source/WebCore/fileapi/Blob.cpp
r280547 r280824 77 77 } 78 78 79 // Unregisters the Blob's internal URL upon destruction. This can be used to extend the lifetime of the Blob data80 // without actually keeping the Blob object alive.81 class BlobInternalURL : public ThreadSafeRefCounted<BlobInternalURL> {82 public:83 static Ref<BlobInternalURL> create(Vector<BlobPart>&& blobParts, const String& contentType)84 {85 return adoptRef(*new BlobInternalURL(WTFMove(blobParts), contentType));86 }87 88 static Ref<BlobInternalURL> createForDeserialization(const URL& sourceURL, const String& fileBackedPath, const String& type)89 {90 return adoptRef(*new BlobInternalURL(sourceURL, fileBackedPath, type));91 }92 93 static Ref<BlobInternalURL> createForSlice(const URL& sourceURL, long long start, long long end, const String& type)94 {95 return adoptRef(*new BlobInternalURL(sourceURL, start, end, type));96 }97 98 static Ref<BlobInternalURL> adoptInternalURL(const URL& url)99 {100 return adoptRef(*new BlobInternalURL(crossThreadCopy(url)));101 }102 103 ~BlobInternalURL()104 {105 ThreadableBlobRegistry::unregisterBlobURL(m_internalURL);106 }107 108 URL url() const { return m_internalURL.isolatedCopy(); }109 110 private:111 BlobInternalURL(Vector<BlobPart>&& blobParts, const String& contentType)112 : m_internalURL(BlobURL::createInternalURL())113 {114 ThreadableBlobRegistry::registerBlobURL(m_internalURL, WTFMove(blobParts), contentType);115 }116 BlobInternalURL(const URL& sourceURL, long long start, long long end, const String& type)117 : m_internalURL(BlobURL::createInternalURL())118 {119 ThreadableBlobRegistry::registerBlobURLForSlice(m_internalURL, sourceURL, start, end, type);120 }121 BlobInternalURL(const URL& sourceURL, const String& fileBackedPath, const String& type)122 : m_internalURL(BlobURL::createInternalURL())123 {124 if (fileBackedPath.isEmpty())125 ThreadableBlobRegistry::registerBlobURL(nullptr, m_internalURL, sourceURL);126 else127 ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_internalURL, sourceURL, fileBackedPath, type);128 }129 BlobInternalURL(URL&& internalURL)130 : m_internalURL(WTFMove(internalURL))131 { }132 133 URL m_internalURL;134 };135 136 79 Blob::Blob(UninitializedContructor, ScriptExecutionContext* context, URL&& url, String&& type) 137 80 : ActiveDOMObject(context) 138 81 , m_type(WTFMove(type)) 139 , m_internalURL( BlobInternalURL::adoptInternalURL(url))82 , m_internalURL(WTFMove(url)) 140 83 { 141 84 } … … 144 87 : ActiveDOMObject(context) 145 88 , m_size(0) 146 , m_internalURL(BlobInternalURL::create({ }, { })) 147 { 89 , m_internalURL(BlobURL::createInternalURL()) 90 { 91 ThreadableBlobRegistry::registerBlobURL(m_internalURL, { }, { }); 148 92 } 149 93 … … 164 108 : ActiveDOMObject(&context) 165 109 , m_type(normalizedContentType(propertyBag.type)) 166 , m_internalURL(BlobInternalURL::create(buildBlobData(WTFMove(blobPartVariants), propertyBag), m_type)) 167 { 110 , m_internalURL(BlobURL::createInternalURL()) 111 { 112 ThreadableBlobRegistry::registerBlobURL(m_internalURL, buildBlobData(WTFMove(blobPartVariants), propertyBag), m_type); 168 113 } 169 114 … … 172 117 , m_type(contentType) 173 118 , m_size(data.size()) 174 , m_internalURL(BlobInternalURL::create({ BlobPart(WTFMove(data)) }, contentType)) 175 { 119 , m_internalURL(BlobURL::createInternalURL()) 120 { 121 ThreadableBlobRegistry::registerBlobURL(m_internalURL, { BlobPart(WTFMove(data)) }, contentType); 176 122 } 177 123 … … 180 126 , m_type(blob.type()) 181 127 , m_size(blob.size()) 182 , m_internalURL(BlobInternalURL::create({ BlobPart(blob.url()) } , m_type)) 183 { 128 , m_internalURL(BlobURL::createInternalURL()) 129 { 130 ThreadableBlobRegistry::registerBlobURL(m_internalURL, { BlobPart(blob.url()) } , m_type); 184 131 } 185 132 … … 188 135 , m_type(normalizedContentType(type)) 189 136 , m_size(size) 190 , m_internalURL(BlobInternalURL::createForDeserialization(srcURL, fileBackedPath, m_type)) 191 { 137 , m_internalURL(BlobURL::createInternalURL()) 138 { 139 if (fileBackedPath.isEmpty()) 140 ThreadableBlobRegistry::registerBlobURL(nullptr, m_internalURL, srcURL); 141 else 142 ThreadableBlobRegistry::registerBlobURLOptionallyFileBacked(m_internalURL, srcURL, fileBackedPath, m_type); 192 143 } 193 144 … … 195 146 : ActiveDOMObject(context) 196 147 , m_type(normalizedContentType(type)) 197 , m_internalURL(Blob InternalURL::createForSlice(srcURL, start, end, m_type))148 , m_internalURL(BlobURL::createInternalURL()) 198 149 // m_size is not necessarily equal to end - start so we do not initialize it here. 199 150 { 151 ThreadableBlobRegistry::registerBlobURLForSlice(m_internalURL, srcURL, start, end, m_type); 200 152 } 201 153 … … 206 158 } 207 159 208 URL Blob::url() const209 {210 return m_internalURL->url();211 }212 213 160 Ref<Blob> Blob::slice(ScriptExecutionContext& context, long long start, long long end, const String& contentType) const 214 161 { 215 auto blob = adoptRef(*new Blob(&context, m_internalURL ->url(), start, end, contentType));162 auto blob = adoptRef(*new Blob(&context, m_internalURL, start, end, contentType)); 216 163 blob->suspendIfNeeded(); 217 164 return blob; … … 223 170 // FIXME: JavaScript cannot represent sizes as large as unsigned long long, we need to 224 171 // come up with an exception to throw if file size is not representable. 225 unsigned long long actualSize = ThreadableBlobRegistry::blobSize(m_internalURL ->url());172 unsigned long long actualSize = ThreadableBlobRegistry::blobSize(m_internalURL); 226 173 m_size = isInBounds<long long>(actualSize) ? actualSize : 0; 227 174 } … … 396 343 } 397 344 398 Blob::Handle Blob::handle() const 399 { 400 return Handle { m_internalURL.copyRef() }; 401 } 402 403 Blob::Handle::Handle(Ref<BlobInternalURL>&& internalURL) 404 : m_internalURL(WTFMove(internalURL)) 405 { } 406 407 Blob::Handle::~Handle() = default; 408 409 Blob::Handle::Handle(Handle&&) = default; 410 Blob::Handle::Handle(const Handle&) = default; 411 412 URL Blob::Handle::url() const 413 { 414 return m_internalURL->url(); 345 BlobURLHandle Blob::handle() const 346 { 347 return BlobURLHandle { m_internalURL }; 415 348 } 416 349 -
trunk/Source/WebCore/fileapi/Blob.h
r280547 r280824 33 33 34 34 #include "BlobPropertyBag.h" 35 #include "BlobURL.h" 35 36 #include "FileReaderLoader.h" 36 37 #include "ScriptExecutionContext.h" … … 58 59 59 60 using BlobPartVariant = Variant<RefPtr<JSC::ArrayBufferView>, RefPtr<JSC::ArrayBuffer>, RefPtr<Blob>, String>; 60 class BlobInternalURL;61 61 62 62 class Blob : public ScriptWrappable, public URLRegistrable, public RefCounted<Blob>, public ActiveDOMObject { … … 94 94 virtual ~Blob(); 95 95 96 WEBCORE_EXPORT URL url() const;96 URL url() const { return m_internalURL; } 97 97 const String& type() const { return m_type; } 98 98 … … 118 118 ExceptionOr<Ref<ReadableStream>> stream(ScriptExecutionContext&); 119 119 120 class Handle {121 public:122 explicit Handle(Ref<BlobInternalURL>&&);123 ~Handle();124 Handle(Handle&&);125 Handle(const Handle&);126 URL url() const;127 private:128 Ref<BlobInternalURL> m_internalURL;129 };130 131 120 // Keeping the handle alive will keep the Blob data alive (but not the Blob object). 132 Handle handle() const;121 BlobURLHandle handle() const; 133 122 134 123 protected: … … 161 150 // as an identifier for this blob. The internal URL is never used to source the blob's content 162 151 // into an HTML or for FileRead'ing, public blob URLs must be used for those purposes. 163 Ref<BlobInternalURL>m_internalURL;152 URL m_internalURL; 164 153 165 154 HashSet<std::unique_ptr<BlobLoader>> m_blobLoaders; -
trunk/Source/WebCore/fileapi/BlobURL.cpp
r279881 r280824 97 97 } 98 98 99 URLWithBlobURLLifetimeExtension::URLWithBlobURLLifetimeExtension(const URL& url)100 : m_url( url)99 BlobURLHandle::BlobURLHandle(const BlobURLHandle& other) 100 : m_url(other.m_url.isolatedCopy()) 101 101 { 102 extendBlobURLLifetimeIfNecessary();102 registerBlobURLHandleIfNecessary(); 103 103 } 104 104 105 URLWithBlobURLLifetimeExtension::~URLWithBlobURLLifetimeExtension() 105 BlobURLHandle::BlobURLHandle(const URL& url) 106 : m_url(url.isolatedCopy()) 106 107 { 107 unregisterCurrentURLIfNecessary(); 108 ASSERT(m_url.protocolIsBlob()); 109 registerBlobURLHandleIfNecessary(); 108 110 } 109 111 110 void URLWithBlobURLLifetimeExtension::extendBlobURLLifetimeIfNecessary()112 BlobURLHandle::~BlobURLHandle() 111 113 { 112 if (m_url.protocolIsBlob()) { 113 auto origin = SecurityOrigin::create(BlobURL::getOriginURL(m_url)); 114 URL temporaryBlobURL = BlobURL::createPublicURL(origin.ptr()); 115 ThreadableBlobRegistry::registerBlobURL(origin.ptr(), temporaryBlobURL, m_url); 116 m_url = WTFMove(temporaryBlobURL); 117 } 114 unregisterBlobURLHandleIfNecessary(); 118 115 } 119 116 120 void URLWithBlobURLLifetimeExtension::unregisterCurrentURLIfNecessary()117 void BlobURLHandle::registerBlobURLHandleIfNecessary() 121 118 { 122 119 if (m_url.protocolIsBlob()) 123 ThreadableBlobRegistry:: unregisterBlobURL(m_url);120 ThreadableBlobRegistry::registerBlobURLHandle(m_url); 124 121 } 125 122 126 URLWithBlobURLLifetimeExtension& URLWithBlobURLLifetimeExtension::operator=(URLWithBlobURLLifetimeExtension&& other)123 void BlobURLHandle::unregisterBlobURLHandleIfNecessary() 127 124 { 128 unregisterCurrentURLIfNecessary(); 125 if (m_url.protocolIsBlob()) 126 ThreadableBlobRegistry::unregisterBlobURLHandle(m_url); 127 } 128 129 BlobURLHandle& BlobURLHandle::operator=(const BlobURLHandle& other) 130 { 131 if (this == &other) 132 return *this; 133 134 unregisterBlobURLHandleIfNecessary(); 135 m_url = other.m_url.isolatedCopy(); 136 registerBlobURLHandleIfNecessary(); 137 138 return *this; 139 } 140 141 void BlobURLHandle::clear() 142 { 143 unregisterBlobURLHandleIfNecessary(); 144 m_url = { }; 145 } 146 147 BlobURLHandle& BlobURLHandle::operator=(BlobURLHandle&& other) 148 { 149 unregisterBlobURLHandleIfNecessary(); 129 150 m_url = std::exchange(other.m_url, { }); 130 151 return *this; 131 152 } 132 153 133 URLWithBlobURLLifetimeExtension& URLWithBlobURLLifetimeExtension::operator=(URL&& url)154 BlobURLHandle& BlobURLHandle::operator=(const URL& url) 134 155 { 135 unregisterCurrentURLIfNecessary(); 136 m_url = WTFMove(url); 137 extendBlobURLLifetimeIfNecessary(); 156 ASSERT(url.protocolIsBlob()); 157 unregisterBlobURLHandleIfNecessary(); 158 m_url = url.isolatedCopy(); 159 registerBlobURLHandleIfNecessary(); 138 160 return *this; 139 161 } -
trunk/Source/WebCore/fileapi/BlobURL.h
r279881 r280824 59 59 }; 60 60 61 class URLWithBlobURLLifetimeExtension { 61 // Extends the lifetime of the Blob URL. This means that the blob URL will remain valid after 62 // revokeObjectURL() has been called, as long as BlobURLHandle objects refer to the blob URL. 63 class BlobURLHandle { 62 64 WTF_MAKE_FAST_ALLOCATED; 63 WTF_MAKE_NONCOPYABLE(URLWithBlobURLLifetimeExtension);64 65 public: 65 URLWithBlobURLLifetimeExtension() = default;66 explicit URLWithBlobURLLifetimeExtension(const URL&);67 ~ URLWithBlobURLLifetimeExtension();66 BlobURLHandle() = default; 67 explicit BlobURLHandle(const URL&); 68 ~BlobURLHandle(); 68 69 69 URLWithBlobURLLifetimeExtension(URLWithBlobURLLifetimeExtension&& other) 70 BlobURLHandle(const BlobURLHandle&); 71 BlobURLHandle(BlobURLHandle&& other) 70 72 : m_url(std::exchange(other.m_url, { })) 71 73 { } 72 74 73 URLWithBlobURLLifetimeExtension& operator=(URLWithBlobURLLifetimeExtension&&); 74 URLWithBlobURLLifetimeExtension& operator=(URL&&); 75 BlobURLHandle& operator=(const BlobURLHandle&); 76 BlobURLHandle& operator=(BlobURLHandle&&); 77 BlobURLHandle& operator=(const URL&); 75 78 76 operator const URL&() const { return m_url; } 77 const URL& url() const { return m_url; } 79 URL url() const { return m_url.isolatedCopy(); } 80 81 void clear(); 78 82 79 83 private: 80 void unregister CurrentURLIfNecessary();81 void extendBlobURLLifetimeIfNecessary();84 void unregisterBlobURLHandleIfNecessary(); 85 void registerBlobURLHandleIfNecessary(); 82 86 83 87 URL m_url; -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp
r276677 r280824 156 156 originMap()->remove(url.string()); 157 157 158 if (isMainThread()){158 ensureOnMainThread([url = url.isolatedCopy()] { 159 159 blobRegistry().unregisterBlobURL(url); 160 return; 161 } 162 callOnMainThread([url = url.isolatedCopy()] { 163 blobRegistry().unregisterBlobURL(url); 160 }); 161 } 162 163 void ThreadableBlobRegistry::registerBlobURLHandle(const URL& url) 164 { 165 ensureOnMainThread([url = url.isolatedCopy()] { 166 blobRegistry().registerBlobURLHandle(url); 167 }); 168 } 169 170 void ThreadableBlobRegistry::unregisterBlobURLHandle(const URL& url) 171 { 172 ensureOnMainThread([url = url.isolatedCopy()] { 173 blobRegistry().unregisterBlobURLHandle(url); 164 174 }); 165 175 } -
trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.h
r276677 r280824 48 48 static void unregisterBlobURL(const URL&); 49 49 50 static void registerBlobURLHandle(const URL&); 51 static void unregisterBlobURLHandle(const URL&); 52 50 53 static unsigned long long blobSize(const URL&); 51 54 -
trunk/Source/WebCore/loader/PolicyChecker.cpp
r279881 r280824 105 105 } 106 106 107 URLWithBlobURLLifetimeExtension FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary(ResourceRequest& request, DocumentLoader* loader, PolicyDecisionMode mode) const107 BlobURLHandle FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary(const ResourceRequest& request, PolicyDecisionMode mode) const 108 108 { 109 109 if (mode != PolicyDecisionMode::Asynchronous || !request.url().protocolIsBlob()) 110 110 return { }; 111 111 112 URLWithBlobURLLifetimeExtension urlWithLifetimeExtension(request.url()); 113 request.setURL(urlWithLifetimeExtension); 114 if (loader) 115 loader->request().setURL(urlWithLifetimeExtension); 116 117 return urlWithLifetimeExtension; 112 return BlobURLHandle { request.url() }; 118 113 } 119 114 … … 198 193 m_frame.loader().clearProvisionalLoadForPolicyCheck(); 199 194 200 auto blobURLLifetimeExtension = extendBlobURLLifetimeIfNecessary(request, loader,policyDecisionMode);195 auto blobURLLifetimeExtension = extendBlobURLLifetimeIfNecessary(request, policyDecisionMode); 201 196 202 197 bool isInitialEmptyDocumentLoad = !m_frame.loader().stateMachine().committedFirstRealDocumentLoad() && request.url().protocolIsAbout() && !substituteData.isValid(); … … 256 251 return function({ }, nullptr, { }, { }, ShouldContinuePolicyCheck::No); 257 252 258 auto blobURLLifetimeExtension = extendBlobURLLifetimeIfNecessary(request , nullptr);253 auto blobURLLifetimeExtension = extendBlobURLLifetimeIfNecessary(request); 259 254 260 255 auto requestIdentifier = PolicyCheckIdentifier::create(); -
trunk/Source/WebCore/loader/PolicyChecker.h
r279881 r280824 52 52 class ResourceError; 53 53 class ResourceResponse; 54 class URLWithBlobURLLifetimeExtension;54 class BlobURLHandle; 55 55 56 56 enum class NavigationPolicyDecision : uint8_t { … … 91 91 private: 92 92 void handleUnimplementablePolicy(const ResourceError&); 93 URLWithBlobURLLifetimeExtension extendBlobURLLifetimeIfNecessary(ResourceRequest&, DocumentLoader*, PolicyDecisionMode = PolicyDecisionMode::Asynchronous) const;93 BlobURLHandle extendBlobURLLifetimeIfNecessary(const ResourceRequest&, PolicyDecisionMode = PolicyDecisionMode::Asynchronous) const; 94 94 95 95 Frame& m_frame; -
trunk/Source/WebCore/platform/network/BlobRegistry.h
r276677 r280824 64 64 virtual void unregisterBlobURL(const URL&) = 0; 65 65 66 virtual void registerBlobURLHandle(const URL&) = 0; 67 virtual void unregisterBlobURLHandle(const URL&) = 0; 68 66 69 virtual unsigned long long blobSize(const URL&) = 0; 67 70 -
trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp
r278516 r280824 116 116 auto blobData = BlobData::create(contentType); 117 117 blobData->appendFile(WTFMove(file)); 118 m_blobs.set(url.string(), WTFMove(blobData));118 addBlobData(url.string(), WTFMove(blobData)); 119 119 } 120 120 … … 150 150 } 151 151 152 m_blobs.set(url.string(), WTFMove(blobData));152 addBlobData(url.string(), WTFMove(blobData)); 153 153 } 154 154 … … 165 165 BlobData* src = getBlobDataFromURL(srcURL); 166 166 if (src) { 167 m_blobs.set(url.string(), src);167 addBlobData(url.string(), src); 168 168 return; 169 169 } … … 175 175 backingFile->appendFile(file.releaseNonNull()); 176 176 177 m_blobs.set(url.string(), WTFMove(backingFile));177 addBlobData(url.string(), WTFMove(backingFile)); 178 178 } 179 179 … … 211 211 appendStorageItems(newData.ptr(), originalData->items(), start, newLength); 212 212 213 m_blobs.set(url.string(), WTFMove(newData));213 addBlobData(url.string(), WTFMove(newData)); 214 214 } 215 215 … … 217 217 { 218 218 ASSERT(isMainThread()); 219 m_blobs.remove(url.string()); 219 if (m_blobReferences.remove(url.string())) 220 m_blobs.remove(url.string()); 220 221 } 221 222 … … 360 361 } 361 362 363 void BlobRegistryImpl::addBlobData(const String& url, RefPtr<BlobData>&& blobData) 364 { 365 auto addResult = m_blobs.set(url, WTFMove(blobData)); 366 if (addResult.isNewEntry) 367 m_blobReferences.add(url); 368 } 369 370 void BlobRegistryImpl::registerBlobURLHandle(const URL& url) 371 { 372 if (m_blobs.contains(url.string())) 373 m_blobReferences.add(url.string()); 374 } 375 376 void BlobRegistryImpl::unregisterBlobURLHandle(const URL& url) 377 { 378 if (m_blobReferences.remove(url.string())) 379 m_blobs.remove(url.string()); 380 } 381 362 382 } // namespace WebCore -
trunk/Source/WebCore/platform/network/BlobRegistryImpl.h
r276677 r280824 34 34 #include "BlobData.h" 35 35 #include "BlobRegistry.h" 36 #include <wtf/HashCountedSet.h> 36 37 #include <wtf/HashMap.h> 37 38 #include <wtf/URLHash.h> … … 66 67 void unregisterBlobURL(const URL&); 67 68 69 void registerBlobURLHandle(const URL&); 70 void unregisterBlobURLHandle(const URL&); 71 68 72 unsigned long long blobSize(const URL&); 69 73 … … 79 83 80 84 private: 85 void addBlobData(const String& url, RefPtr<BlobData>&&); 86 87 HashCountedSet<String> m_blobReferences; 81 88 HashMap<String, RefPtr<BlobData>> m_blobs; 82 89 }; -
trunk/Source/WebCore/xml/XMLHttpRequest.cpp
r280260 r280824 252 252 // We'll only disable this functionality for HTTP(S) requests since sync requests for local protocols 253 253 // such as file: and data: still make sense to allow. 254 if (!m_async && scriptExecutionContext()->isDocument() && m_url. url().protocolIsInHTTPFamily()) {254 if (!m_async && scriptExecutionContext()->isDocument() && m_url.protocolIsInHTTPFamily()) { 255 255 logConsoleError(scriptExecutionContext(), "XMLHttpRequest.responseType cannot be changed for synchronous HTTP(S) requests made from the window context."); 256 256 return Exception { InvalidAccessError }; … … 383 383 clearRequest(); 384 384 385 auto upgradedURL = url; 386 context->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(upgradedURL, ContentSecurityPolicy::InsecureRequestType::Load); 387 m_url = WTFMove(upgradedURL); 385 m_url = url; 386 context->contentSecurityPolicy()->upgradeInsecureRequestIfNeeded(m_url, ContentSecurityPolicy::InsecureRequestType::Load); 387 if (m_url.protocolIsBlob()) 388 m_blobURLLifetimeExtension = m_url; 388 389 389 390 m_async = async; … … 418 419 419 420 if (is<Document>(context) && downcast<Document>(context).shouldIgnoreSyncXHRs()) { 420 logConsoleError(scriptExecutionContext(), makeString("Ignoring XMLHttpRequest.send() call for '", m_url. url().string(), "' because the maximum number of synchronous failures was reached."));421 logConsoleError(scriptExecutionContext(), makeString("Ignoring XMLHttpRequest.send() call for '", m_url.string(), "' because the maximum number of synchronous failures was reached.")); 421 422 return ExceptionOr<void> { }; 422 423 } … … 522 523 523 524 if (m_method != "GET" && m_method != "HEAD") { 524 if (!m_url. url().protocolIsInHTTPFamily()) {525 if (!m_url.protocolIsInHTTPFamily()) { 525 526 // FIXME: We would like to support posting Blobs to non-http URLs (e.g. custom URL schemes) 526 527 // but because of the architecture of blob-handling that will require a fair amount of work. … … 595 596 { 596 597 // Only GET request is supported for blob URL. 597 if (!m_async && m_url.url().protocolIsBlob() && m_method != "GET") 598 if (!m_async && m_url.protocolIsBlob() && m_method != "GET") { 599 m_blobURLLifetimeExtension.clear(); 598 600 return Exception { NetworkError }; 601 } 599 602 600 603 if (m_async && m_upload && m_upload->hasEventListeners()) … … 748 751 m_requestEntityBody = nullptr; 749 752 m_url = URL { }; 753 m_blobURLLifetimeExtension.clear(); 750 754 } 751 755 … … 940 944 m_loadingActivity = std::nullopt; 941 945 m_url = URL { }; 946 m_blobURLLifetimeExtension.clear(); 942 947 943 948 m_sendFlag = false; -
trunk/Source/WebCore/xml/XMLHttpRequest.h
r279881 r280824 217 217 std::unique_ptr<XMLHttpRequestUpload> m_upload; 218 218 219 URLWithBlobURLLifetimeExtension m_url; 219 URL m_url; 220 BlobURLHandle m_blobURLLifetimeExtension; 220 221 String m_method; 221 222 HTTPHeaderMap m_requestHeaders; -
trunk/Source/WebKit/ChangeLog
r280811 r280824 1 2021-08-09 Chris Dumez <cdumez@apple.com> 2 3 Blob URL changes after loading it 4 https://bugs.webkit.org/show_bug.cgi?id=228923 5 6 Reviewed by Geoff Garen. 7 8 * NetworkProcess/NetworkConnectionToWebProcess.cpp: 9 (WebKit::NetworkConnectionToWebProcess::registerBlobURLHandle): 10 (WebKit::NetworkConnectionToWebProcess::unregisterBlobURLHandle): 11 * NetworkProcess/NetworkConnectionToWebProcess.h: 12 * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 13 * NetworkProcess/NetworkProcessPlatformStrategies.cpp: 14 (WebKit::NetworkProcessPlatformStrategies::createBlobRegistry): 15 * WebProcess/FileAPI/BlobRegistryProxy.cpp: 16 (WebKit::BlobRegistryProxy::registerBlobURLHandle): 17 (WebKit::BlobRegistryProxy::unregisterBlobURLHandle): 18 * WebProcess/FileAPI/BlobRegistryProxy.h: 19 1 20 2021-08-09 Myles C. Maxfield <mmaxfield@apple.com> 2 21 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
r280419 r280824 867 867 } 868 868 869 void NetworkConnectionToWebProcess::registerBlobURLHandle(const URL& url) 870 { 871 auto* session = networkSession(); 872 if (!session) 873 return; 874 875 session->blobRegistry().registerBlobURLHandle(url); 876 } 877 878 void NetworkConnectionToWebProcess::unregisterBlobURLHandle(const URL& url) 879 { 880 auto* session = networkSession(); 881 if (!session) 882 return; 883 884 session->blobRegistry().unregisterBlobURLHandle(url); 885 } 886 869 887 void NetworkConnectionToWebProcess::blobSize(const URL& url, CompletionHandler<void(uint64_t)>&& completionHandler) 870 888 { -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
r279619 r280824 237 237 void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&&)>&&); 238 238 239 void registerBlobURLHandle(const URL&); 240 void unregisterBlobURLHandle(const URL&); 241 239 242 void setCaptureExtraNetworkLoadMetricsEnabled(bool); 240 243 -
trunk/Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
r279619 r280824 57 57 BlobSize(URL url) -> (uint64_t resultSize) Synchronous 58 58 WriteBlobsToTemporaryFiles(Vector<String> blobURLs) -> (Vector<String> fileNames) Async 59 RegisterBlobURLHandle(URL url); 60 UnregisterBlobURLHandle(URL url); 59 61 60 62 SetCaptureExtraNetworkLoadMetricsEnabled(bool enabled) -
trunk/Source/WebKit/NetworkProcess/NetworkProcessPlatformStrategies.cpp
r276677 r280824 66 66 unsigned long long blobSize(const URL&) final { ASSERT_NOT_REACHED(); return 0; } 67 67 void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final { ASSERT_NOT_REACHED(); } 68 void registerBlobURLHandle(const URL&) final { ASSERT_NOT_REACHED(); } 69 void unregisterBlobURLHandle(const URL&) final { ASSERT_NOT_REACHED(); } 68 70 }; 69 71 static NeverDestroyed<EmptyBlobRegistry> blobRegistry; -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
r276677 r280824 75 75 } 76 76 77 void BlobRegistryProxy::registerBlobURLHandle(const URL& url) 78 { 79 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::RegisterBlobURLHandle(url), 0); 80 } 81 82 void BlobRegistryProxy::unregisterBlobURLHandle(const URL& url) 83 { 84 WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::UnregisterBlobURLHandle(url), 0); 85 } 86 77 87 unsigned long long BlobRegistryProxy::blobSize(const URL& url) 78 88 { -
trunk/Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.h
r276677 r280824 40 40 unsigned long long blobSize(const URL&) final; 41 41 void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&&) final; 42 void registerBlobURLHandle(const URL&) final; 43 void unregisterBlobURLHandle(const URL&) final; 42 44 }; 43 45 -
trunk/Source/WebKitLegacy/mac/ChangeLog
r280795 r280824 1 2021-08-09 Chris Dumez <cdumez@apple.com> 2 3 Blob URL changes after loading it 4 https://bugs.webkit.org/show_bug.cgi?id=228923 5 6 Reviewed by Geoff Garen. 7 8 * WebCoreSupport/WebPlatformStrategies.mm: 9 1 10 2021-08-09 Myles C. Maxfield <mmaxfield@apple.com> 2 11 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebPlatformStrategies.mm
r278253 r280824 92 92 unsigned long long blobSize(const URL& url) final { return m_blobRegistry.blobSize(url); } 93 93 void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); } 94 void registerBlobURLHandle(const URL& url) final { m_blobRegistry.registerBlobURLHandle(url); } 95 void unregisterBlobURLHandle(const URL& url) final { m_blobRegistry.unregisterBlobURLHandle(url); } 94 96 95 97 BlobRegistryImpl* blobRegistryImpl() final { return &m_blobRegistry; } -
trunk/Source/WebKitLegacy/win/ChangeLog
r280784 r280824 1 2021-08-09 Chris Dumez <cdumez@apple.com> 2 3 Blob URL changes after loading it 4 https://bugs.webkit.org/show_bug.cgi?id=228923 5 6 Reviewed by Geoff Garen. 7 8 * WebCoreSupport/WebPlatformStrategies.cpp: 9 1 10 2021-08-09 Stephan Szabo <stephan.szabo@sony.com> 2 11 -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebPlatformStrategies.cpp
r276982 r280824 88 88 unsigned long long blobSize(const URL& url) final { return m_blobRegistry.blobSize(url); } 89 89 void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&& filePaths)>&& completionHandler) final { m_blobRegistry.writeBlobsToTemporaryFiles(blobURLs, WTFMove(completionHandler)); } 90 void registerBlobURLHandle(const URL& url) final { m_blobRegistry.registerBlobURLHandle(url); } 91 void unregisterBlobURLHandle(const URL& url) final { m_blobRegistry.unregisterBlobURLHandle(url); } 90 92 91 93 BlobRegistryImpl* blobRegistryImpl() final { return &m_blobRegistry; }
Note: See TracChangeset
for help on using the changeset viewer.