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}
Showing
This diff is collapsed.
Please register or sign in to comment