Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6e23f71b34e62d50b9f18e59b928570712c7c143
      
https://github.com/WebKit/WebKit/commit/6e23f71b34e62d50b9f18e59b928570712c7c143
  Author: Sihui Liu <[email protected]>
  Date:   2025-01-31 (Fri, 31 Jan 2025)

  Changed paths:
    A LayoutTests/storage/indexeddb/modern/blob-simple-private-expected.txt
    A LayoutTests/storage/indexeddb/modern/blob-simple-private.html
    A 
LayoutTests/storage/indexeddb/modern/blob-simple-workers-private-expected.txt
    A LayoutTests/storage/indexeddb/modern/blob-simple-workers-private.html
    M LayoutTests/storage/indexeddb/modern/resources/blob-simple-workers.js
    M LayoutTests/storage/indexeddb/modern/resources/blob-simple.js
    M Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
    M Source/WebCore/Modules/indexeddb/IDBTransaction.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp
    M Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h
    M Source/WebCore/bindings/js/SerializedScriptValue.cpp
    M Source/WebCore/bindings/js/SerializedScriptValue.h
    M Source/WebCore/loader/EmptyClients.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
    M Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h
    M Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
    M Source/WebKitLegacy/Storage/InProcessIDBServer.cpp

  Log Message:
  -----------
  Return error when storing blobs in IndexedDB for ephemeral session
https://bugs.webkit.org/show_bug.cgi?id=286561
rdar://143668397

Reviewed by Brady Eidson.

Currently error is only returned for Window context but not Worker, and this 
makes it look like blobs can be stored in
Workers. To fix it, this patch ensures 
SerializedScriptValue::writeBlobsToDiskForIndexedDB checks whether it's 
ephemeral
session before storing blobs to disk. Also, add a message check in network 
proccess for corresponding message for
safety.

* LayoutTests/storage/indexeddb/modern/blob-simple-private-expected.txt: Added.
* LayoutTests/storage/indexeddb/modern/blob-simple-private.html: Added.
* 
LayoutTests/storage/indexeddb/modern/blob-simple-workers-private-expected.txt: 
Added.
* LayoutTests/storage/indexeddb/modern/blob-simple-workers-private.html: Added.
* LayoutTests/storage/indexeddb/modern/resources/blob-simple-workers.js:
* LayoutTests/storage/indexeddb/modern/resources/blob-simple.js:
* Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::putOrAdd):
* Source/WebCore/Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::putOrAddOnServer):
* Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::IDBConnectionProxy):
(WebCore::IDBClient::IDBConnectionProxy::sessionID const):
* Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.h:
* Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.cpp:
(WebCore::IDBClient::IDBConnectionToServer::create):
(WebCore::IDBClient::IDBConnectionToServer::IDBConnectionToServer):
* Source/WebCore/Modules/indexeddb/client/IDBConnectionToServer.h:
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
(WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
* Source/WebCore/bindings/js/SerializedScriptValue.h:
* Source/WebCore/loader/EmptyClients.cpp:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::writeBlobsToTemporaryFilesForIndexedDB):
* Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::create):
(WebKit::WebIDBConnectionToServer::WebIDBConnectionToServer):
* Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.h:
* Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::idbConnectionToServer):
* Source/WebKitLegacy/Storage/InProcessIDBServer.cpp:
(InProcessIDBServer::InProcessIDBServer):

Canonical link: https://commits.webkit.org/289628@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to