New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 719007 link

Starred by 15 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Feature

Blocked on:
issue 719004
issue 713409
issue 756447
issue 775243

Blocking:
issue 719172


Participants' hotlists:
OWP-Storage-WASM


Sign in to add a comment

Support WASM modules in IndexedDB & Blobs

Project Member Reported by dmu...@chromium.org, May 5 2017

Issue description

Umbrella bug.

All of these may or may not be required, pending more investigation.

* Auto-wrapping large values in blobs ( issue 713409 )
* Add blob construction hints / requirements so blobs can be saved directly to disk when requested. (issue 719004)

Current issues:
WASM modules can always be loaded as auto-blob'd data that will just deserialize using the SSV deserializer.

Further support might be needed for:
* Signaling re-compilation as early as possible, in browser? renderer? Hooks?
* Re-saving 'compiled' version when it needs to re-compile, as v8 version has changed. This will be the MOST challenging. No solution is good here yet.

 
Cc: mtrofin@chromium.org dmu...@chromium.org mek@chromium.org pwnall@chromium.org
Owner: jsb...@chromium.org
Status: Assigned (was: Available)
Assigning to jsbell for triage (should be assigned to me, or victor, or mircea?)

The current 'proposed' final best solution:

* WASM creates blobs in however segmenting strategy they want.
* For saving to IDB, WASM saves their object, with its collection of blobs, to IDB - with some hint so IDB in the backend knows it's a wasm thing.
* WASM REQUIRES the transaction be a readwrite transaction when reading a wasm blob back, so it can possibly re-save the newly compiled blolb
* WASM will be able to grab the blob file handles on read for mmaping.

If we don't want that readwrite requirement, things get really complicated... some sort of atomic file rename, but we don't want to have race conditions w/ multiple reads, so it get bad and complex. 
I think we're fine to have the R/W requirement. It's not currently in the (loosely written) spec, but can't see difficulties in making its case. 

From an implementation perspective, I assume this means wasm serialization will be split between v8 and the blink-side delegate - correct? 
Sorry, #1 might be confusing given some context. We haven't yet figured out that the _best_ solution is to have WASM create the blobs. Thank you very much for bearing with my slowness -- I'll have my thoughts ready early next week.
Labels: -Pri-3 Pri-1
Owner: pwnall@chromium.org
Since pwnall@ is actively working on this (design doc and implementation), passing it to him.

Comment 5 by pwnall@chromium.org, May 18 2017

Mostly for self-reference, here is how blobs are processed in the IndexedDB backend. This will hopefully turn into a document / doc improvements sometime soon.


Blob processing in IDBObjectStore::put()

IDBObjectStore::put
-> WebIDBDatabaseImpl::Put
-> WebIDBDatabaseImpl::IOThreadHelper::Put
-> Database::Put (in indexed_db.mojom)
-> DatabaseImpl::Put
     - collects vector<BlobDataHandle>
     - constructs vector<IndexedDBBlobInfo>
-> DatabaseImpl::IDBThreadHelper::Put
     - constructs IndexedDBValue
-> IndexedDBDatabase::Put
-> IndexedDBDatabase::PutOperation
   -> IndexedDBBackingStore::PutRecord
   -> IndexedDBBackingStore::Transaction::PutBlobInfoIfNeeded
   -> IndexedDBBackingStore::Transaction::PutBlobInfo
        - constructs / changes BlobChangeRecord in blob_change_map_
+> IndexedDBCallbacks::OnSuccess
-> IndexedDBCallbacks::IOThreadHelper::SendSuccessKey
-> Callbacks::SuccessKey (in indexed_db.mojo)
-> IndexedDBCallbacksImpl::SuccessKey
-> IndexedDBCallbacksImpl::InternalState::SuccessKey
-> WebIDBKeyBuilder::Build
+> WebIDBCallbacksImpl::OnSuccess(WebIDBKey)
-> IDBRequest::HandleResponse(IDBKey)

Blobs get written before a transaction gets committed

IndexedDBBackingStore::Transaction::CommitPhaseOne
-> IndexedDBBackingStore::Transaction::HandleBlobPreTransaction
     - new_blob_entries argument
         = std::vector<std::pair<BlobEntryKey, std::string>>
         = maps BlobEntryKey to encoded std::vector<IndexedDBBlobInfo*>
         = uses EncodeBlobData in indexed_db_backing_store.cc
         = encodes is_file, key, MIME type, is_file ? file name : blob size
     - new_files_to_write argument
         = std::vector<IndexedDBBackingStore::Transaction::WriteDescriptor>
     - blobs_to_write_ is modified
         = std::vector<BlobJournalEntryType>
         = std::vector<std::pair<int64_t, int64_t>>
         = pair of (database ID, blob key)
     - creates a pre-transaction for writing to the blob journal
   -> BlobEntryKey::FromObjectStoreDataKey
        - populates BlobEntryKey (first pair member) in new_blob_entries
   +> EncodeBlobData (in indexed_db_backing_store.cc)
        - populates IndexedDBBlobInfo (second pair member element) in new_blob_entries
   +> AppendBlobsToPrimaryBlobJournal (in indexed_db_backing_store.cc)
      -> AppendBlobsToBlobJournal (in indexed_db_backing_store.cc)
      -> UpdateBlobJournal (in indexed_db_backing_store.cc)
      -> EncodeBlobJournal (in indexed_db_backing_store.cc)
           - encodes std::vector<std::pair<BlobEntryKey, std::string>>
      +> LevelDBDirectTransaction::Put
   +> LevelDBTransaction::Commit
+> IndexedDBBackingStore::Transaction::WriteNewBlobs
     - writes new_blob_entries (which contains new/deleted entries) to LevelDB
   -> LevelDBTransaction::Put
-> IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl::ChainedBlobWriterImpl
-> IndexedDBBackingStore::Transaction::ChainedBlobWriterImpl::WriteNextFile
-> IndexedDBBackingStore::WriteBlobFile
-> LocalWriteClosure::WriteBlobToFileOnIOThread (in indexed_db_backing_store.cc)
-> net::URLRequestContext::CreateContext() to FileWriterDelegate
   (getting the blob saved to a file)

Blob processing in IDBObjectStore::get()

IDBObjectStore::get
-> WebIDBDatabaseImpl::Get
-> WebIDBDatabaseImpl::IOThreadHelper::Get
-> Database::Get (in indexed_db.mojom)
-> DatabaseImpl::Get
-> DatabaseImpl::IDBThreadHelper::Get
-> IndexedDBDatabase::Get
-> IndexedDBDatabase::GetOperation
   -> IndexedDBBackingStore::GetRecord
   -> IndexedDBBackingStore::Transaction::GetBlobInfoForRecord
   -> BlobEntryKey::FromObjectStoreDataKey
        - re-creates the key passed to IndexedDBBackingStore::Transaction::WriteNewBlobs
   +> LevelDBTransaction::Get
        - reads the encoded std::vector<IndexedDBBlobInfo*>
   +> DecodeBlobData (in indexed_db_backing_store.cc)
        - decodes to std::vector<IndexedDBBlobInfo*>
        - only sets is_file, MIME type, is_file? file name : blob size
   +> IndexedDBBackingStore::GetBlobFileName
        - used to set file_path in IndexedDBBlobInfo
   +> base::GetFileInfo
        - if it succeeds, used to set last_modified and size in IndexedDBBlobInfo
-> IndexedDBCallbacks::OnSuccess(IndexedDBReturnValue*)
-> ConvertReturnValue in indexed_db_callbacks.cc
     - creates a ReturnValue (in indexed_db.mojom)
     - the ReturnValue holds a Value (in indexed_db.mojom) which is ~= IDBValue
   -> ConvertBlobInfo in indexed_db_callbacks.cc
        - for Blobs, populates mime_type and size of ReturnValue::Value
        - for Files, also populates name / path / last_modified of ReturnValue::Value
        - does not populate uuid of ReturnValue::Value
+> IndexedDBCallbacks::IOThreadHelper::SendSuccessValue
-> IndexedDBCallbacks::IOThreadHelper::CreateAllBlobs
   -> IndexedDBCallbacks::IOThreadHelper::CreateBlobData
        - used to populate the uuid of ReturnValue::Value
      -> ShareableFileReference::Get
      +> ShareableFileReference::GetOrCreate
         -> ShareableFileReference::GetOrCreate(ScopedFile)
      +> IndexedDBDispatcherHost::HoldBlobData
      -> base::GenerateGUID
           - creates a new UUID for files in the IDB backing store
           - this is the UUID that ends up in ReturnValue::Value
      +> BlobDataBuilder::BlobDataBuilder
      +> BlobDataBuilder::AppendFile
      +> BlobStorageContext::AddFinishedBlob
+> Callbacks::SuccessValue (in indexed_db.mojom)
-> IndexedDBCallbacksImpl::SuccessValue
-> IndexedDBCallbacksImpl::InternalState::SuccessValue
-> ConvertReturnValue in indexed_db_callbacks_impl.cc
   -> IndexedDBCallbacksImpl::ConvertValue
        - copies everything, including uuid
   +> WebIDBKeyBuilder::Build
   +> WebIDBKeyPathBuilder::Build
+> WebIDBCallbacksImpl::OnSuccess(WebIDBValue)
-> IDBRequest::HandleResponse(PassRefPtr<IDBValue>)

Legend
-> nested call
+> sibling call
Labels: -Type-Bug Type-Feature

Comment 7 by pwnall@chromium.org, Aug 23 2017

Blockedon: 756447
Large value wrapping has been disabled in M62, because it's causing the IndexedDB backing store to leak the files used to store the Blobs. The leakage seems to exist without the presence of large value wrapping, but the wrapping amplifies the Blob usage, and thus the leakage. We'll need to figure that out before we can make progress here.

Comment 8 by pwnall@chromium.org, Oct 16 2017

Blockedon: 775243
Cc: nattestad@chromium.org
 Issue 755918  has been merged into this issue.
Blob leaking has been fixed! Large value wrapper can be re-enabled now. :)
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/564f38984a515998699c7a522f9721a22933630c

commit 564f38984a515998699c7a522f9721a22933630c
Author: Victor Costan <pwnall@chromium.org>
Date: Tue Nov 14 00:59:39 2017

IndexedDB: Re-enable special handling of large values.

Design doc:
https://docs.google.com/document/d/1wmbLb91Se4OIp3Z0eKkAJEHG4YHgq75WUH2mqazrnik

Bug:  719007 
Change-Id: Icda80ecdc512099508788cffc9be70c23c35005c
Reviewed-on: https://chromium-review.googlesource.com/765057
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516126}
[modify] https://crrev.com/564f38984a515998699c7a522f9721a22933630c/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.h

Blocking: 719172
Project Member

Comment 13 by bugdroid1@chromium.org, Dec 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1acdbc652e1a524b3d4a6382d88de17abdafad6b

commit 1acdbc652e1a524b3d4a6382d88de17abdafad6b
Author: Victor Costan <pwnall@chromium.org>
Date: Thu Dec 07 06:52:06 2017

IndexedDB: Refactor value wrapping code.

This is extracted from the WASM + IndexedDB code into a separate CL, for
better reviewability. Serializing WASM modules will add a format to the
value-wrapping logic, pushing the total complexity to the point where
the benefits of having clearly separated lifecycle steps for
IDBValueWrapper exceed the benefits of having a terse API.

Therefore, this CL introduces a clear separation between the stages of
an IDBValueWrapper's lifecycle, which are:
1) Cloning (a structured clone may be needed to compute index values)
2) Wrapping
3) Extracting information for the backend -- the data bytes and the Blob list

The CL also introduces logic for including byte vectors in wrappers,
which will be needed for the V8 snapshot version -- details in
https://docs.google.com/document/d/1IgUeRLza0WC3uAzXxla5rH1bs5jUHKbLjsfU--zdYag

Last, this CL makes it possible to call
IDBValueWrapper::WrapIfBiggerThan() multiple times, which will come in
handy for the new wrapping format -- details in
https://crrev.com/c/709596/17/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.cpp


Bug:  719007 
Change-Id: Ie74ddfd4ec849d4777ab9a3af5dc254fc5b14837
Reviewed-on: https://chromium-review.googlesource.com/804969
Commit-Queue: Victor Costan <pwnall@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522369}
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBTestHelper.cpp
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.cpp
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.h
[modify] https://crrev.com/1acdbc652e1a524b3d4a6382d88de17abdafad6b/third_party/WebKit/Source/modules/indexeddb/IDBValueWrappingTest.cpp

Project Member

Comment 14 by bugdroid1@chromium.org, Dec 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/990cb0f6350c9f04d2878f7217bfb001da345336

commit 990cb0f6350c9f04d2878f7217bfb001da345336
Author: Victor Costan <pwnall@chromium.org>
Date: Fri Dec 15 21:10:00 2017

IndexedDB: Remove reference-counting from IDBValue.

This reduces the cognitive load of reasoning about IDBValue ownership,
which makes it easier to add complexity to the IndexedDB value wrapping
logic.

Bug:  719007 
Change-Id: I3afe209a4d1d58440fce424bd263e4888ebde503
Reviewed-on: https://chromium-review.googlesource.com/828531
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524463}
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBAny.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBObservation.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequestLoader.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequestLoader.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequestQueueItem.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBRequestQueueItem.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBTestHelper.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBTestHelper.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.h
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/IDBValueWrappingTest.cpp
[modify] https://crrev.com/990cb0f6350c9f04d2878f7217bfb001da345336/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp

Project Member

Comment 15 by bugdroid1@chromium.org, Jan 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6144b847dade39491ceb864d0d1987c86435d1e3

commit 6144b847dade39491ceb864d0d1987c86435d1e3
Author: Victor Costan <pwnall@chromium.org>
Date: Fri Jan 12 04:38:11 2018

IndexedDB: Clarify ownership for IDBKey, WebIDBKey and WebIDBValue.

IDBKey is moved off of the Oilpan heap and each instance has a single
owner, who holds a std::unique_ptr pointing to the instance. As a
consequence, IDBCursor now owns its key and primary key, IDBKeyRange
owns its endpoints, and IDBValue owns any injected primary key.

Unfortunately, it is fairly common to have IDBKeyRange instances whose
endpoints come from the same key. IDBKeyRange's internal representation
is now a bit more complex, to account for the fact that the endpoints
can either share a key or have separate keys.

WebIDBKey is now a wrapper for std::unique_ptr<IDBKey>, so it is
move-only. WebIDBKeyView is introduced as a non-owning reference of an
IDBKey, in order to avoid key copying for operations like
IDBCursor::update(), which must send key information to the backing
store, but must also retain the key.

WebIDBValue has a WebIDBKey member that holds the value's primary key,
when that primary is stored separately from the value's wire bytes in
the backing store. As WebIDBKey is move-only, WebIDBValue must also
become move-only. This is accomplished by turning WebIDBValue into a
wrapper for a std::unique_ptr<IDBValue>, taking advantage of IDBValue's
recent ownership cleanup.

Bug:  719007 
Change-Id: I754875fa1378af7a8a1ebc56058cd7313b08a897
Reviewed-on: https://chromium-review.googlesource.com/830517
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Commit-Queue: Victor Costan <pwnall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#528879}
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/indexed_db_callbacks_impl.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/indexed_db_callbacks_impl.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/indexed_db_database_callbacks_impl.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/indexed_db_key_builders.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/indexed_db_key_builders.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/mock_webidbcallbacks.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/mock_webidbcallbacks.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbcursor_impl.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbcursor_impl.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbcursor_impl_unittest.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbdatabase_impl.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbdatabase_impl.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/content/renderer/indexed_db/webidbdatabase_impl_unittest.cc
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModulesTest.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/exported/BUILD.gn
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/exported/WebIDBKey.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/exported/WebIDBKeyRange.cpp
[add] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/exported/WebIDBValue.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBAny.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBAny.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBFactory.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKey.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBKeyRange.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObservation.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBObserverChanges.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequest.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequest.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequestLoader.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequestQueueItem.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequestQueueItem.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBTestHelper.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBTestHelper.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBValueWrapping.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/IDBValueWrappingTest.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCallbacks.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBCursor.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabase.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKey.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyPath.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBKeyRange.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBObservation.h
[modify] https://crrev.com/6144b847dade39491ceb864d0d1987c86435d1e3/third_party/WebKit/public/platform/modules/indexeddb/WebIDBValue.h

Status: Started (was: Assigned)
 Issue 807474  has been merged into this issue.
Project Member

Comment 18 by bugdroid1@chromium.org, Apr 27 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/28e015dbaf6a1c6880f13210621b08f4d3f0f834

commit 28e015dbaf6a1c6880f13210621b08f4d3f0f834
Author: Bill Budge <bbudge@chromium.org>
Date: Fri Apr 27 17:40:07 2018

[wasm] Refactor wasm-serialization to fix alignment

- Alignment of code sections is only relative to start of header. Code
  should be aligned in the buffer.
- Rewrites Reader/Writer classes to make global alignment easier.
- Rewrites the native serialization to simplify things in preparation
  for switch to streaming serialization APIs.

Bug:  chromium:719007 
Change-Id: I0397bc84a8d009b4fd7f5286bb5abc527bb0db95
Reviewed-on: https://chromium-review.googlesource.com/1027433
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52860}
[modify] https://crrev.com/28e015dbaf6a1c6880f13210621b08f4d3f0f834/src/wasm/wasm-serialization.cc

Project Member

Comment 19 by bugdroid1@chromium.org, May 3 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/0a1b8f9692c7d0e314b695de738f357c5a6d7989

commit 0a1b8f9692c7d0e314b695de738f357c5a6d7989
Author: Bill Budge <bbudge@chromium.org>
Date: Thu May 03 15:32:14 2018

[wasm] Avoid extra copies when serializing the native module

- Separates measuring from wasm::SerializeNativeModule so caller
  can allocate or reserve the buffer memory. Call site thus avoid
  one unnecessary copy.

Bug:  chromium:719007 
Cq-Include-Trybots: luci.chromium.try:linux_chromium_rel_ng
Change-Id: I50412c0c0279114dcdc1aead810ad39e7c4e2a6e
Reviewed-on: https://chromium-review.googlesource.com/1039183
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52965}
[modify] https://crrev.com/0a1b8f9692c7d0e314b695de738f357c5a6d7989/src/api.cc
[modify] https://crrev.com/0a1b8f9692c7d0e314b695de738f357c5a6d7989/src/runtime/runtime-test.cc
[modify] https://crrev.com/0a1b8f9692c7d0e314b695de738f357c5a6d7989/src/value-serializer.cc
[modify] https://crrev.com/0a1b8f9692c7d0e314b695de738f357c5a6d7989/src/wasm/wasm-serialization.cc
[modify] https://crrev.com/0a1b8f9692c7d0e314b695de738f357c5a6d7989/src/wasm/wasm-serialization.h

Status: WontFix (was: Started)
WontFix-ing this, as WASM support in IDB is canceled.
On noes. Are there any details we can read up on the reason this has been cancelled?
For clarity: WASM will still have a caching story. It's just that the details will involve a mechanism that is not IDB. 

Using IDB to cache WASM adds a lot of unnecessary complexity, and we expect that other avenues will yield a faster path to WASM caching. You can get some ideas about the complexities involved by reading https://docs.google.com/document/d/1PntTuoo3MKGjfPEVyA0SC01NYRdpuCMxRKjHjW3Z1OA/ and https://docs.google.com/document/d/1IgUeRLza0WC3uAzXxla5rH1bs5jUHKbLjsfU--zdYag/

Sign in to add a comment