- 07 Jul, 2017 1 commit
-
-
titzer authored
This CL refactors the internal representation of JavaScript-exposed WebAssembly objects to be more like other such objects in V8. By introducing a new instance type for each of the JS-exposed types, we get more robust typechecking without using embedder fields (which were previously used when these objects where instance type JS_API_OBJECT). In addition to the new instance types, the subclasses X of JSObject (WasmInstanceObject, WasmMemoryObject, WasmModuleObject, WasmTableObject) now have appropriate Is##X() methods on Object and are now robust. BUG=v8:6547 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_rel_ng Review-Url: https://codereview.chromium.org/2964943002 Cr-Commit-Position: refs/heads/master@{#46475}
-
- 22 Jun, 2017 1 commit
-
-
Toon Verwaest authored
SeededNumberDictionaries are used to implement element backing stores of JSObjects, not internally used dictionaries. This saves space for the anyway unused PropertyDetails entry (1/3 fields). Bug: Change-Id: I6fe9fae6de500dd0bcb722f51a7543952c7813e9 Reviewed-on: https://chromium-review.googlesource.com/543343 Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by:
Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#46124}
-
- 27 Apr, 2017 1 commit
-
-
jbroman authored
BUG=chromium:704293 Review-Url: https://codereview.chromium.org/2804643006 Cr-Commit-Position: refs/heads/master@{#44945}
-
- 04 Apr, 2017 1 commit
-
-
jbroman authored
This enables clients like IndexedDB to know when the data format version has decreased (i.e. the user has switched to an earlier version) and deal with the resulting incompatibility up front. BUG=chromium:704293 Review-Url: https://codereview.chromium.org/2772723005 Cr-Commit-Position: refs/heads/master@{#44391}
-
- 21 Mar, 2017 2 commits
-
-
mtrofin authored
Reland of [wasm] Transferrable modules (patchset #1 id:1 of https://codereview.chromium.org/2762163002/ ) Reason for revert: Temporarily disabled tests on chromium side (https://codereview.chromium.org/2764933002) Original issue's description: > Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ ) > > Reason for revert: > Breaks layout tests: > https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312 > > See https://github.com/v8/v8/wiki/Blink-layout-tests > > Original issue's description: > > [wasm] Transferrable modules > > > > We want to restrict structured cloning in Chrome to: > > - postMessage senders and receivers that are co-located > > in the same process > > - indexedDB (just https). > > > > For context, on the Chrome side, we will achieve the postMessage part > > by using a mechanism similar to transferrables: the > > SerializedScriptValue will have a list of wasm modules, separate from > > the serialized data stream; and this list won't be copied cross > > process boundaries. The IDB part is achieved by explicitly opting in > > reading/writing to the serialization stream. To block attack vectors > > in IPC cases, the default for deserialization will be to expect data > > in the wasm transfers list. > > > > This change is the V8 side necessary to enabling this design. We > > introduce TransferrableModule, an opaque datatype exposed to the > > embedder. Internally, TransferrableModules are just serialized data, > > because we don't have a better mechanism, at the moment, for > > de-contextualizing/re-contextualizing wasm modules (wrt Isolate and > > Context). > > > > The chrome defaults will be implemented in the > > serialization/deserialization delegates on that side. For the v8 side > > of things, in the absence of a serialization delegate, the V8 > > serializer will write to serialization stream. In the absence of a > > deserialization delegate, the deserializer won't work. This asymmetry > > is intentional - it communicates to the embedder the need to make a > > policy decision, otherwise wasm serialization/deserialization won't > > work "out of the box". > > > > BUG=v8:6079 > > > > Review-Url: https://codereview.chromium.org/2748473004 > > Cr-Commit-Position: refs/heads/master@{#43955} > > Committed: https://chromium.googlesource.com/v8/v8/+/99743ad460ea5b9795ba9d70a074e75d7362a3d1 > > TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=v8:6079 > > Review-Url: https://codereview.chromium.org/2762163002 > Cr-Commit-Position: refs/heads/master@{#43981} > Committed: https://chromium.googlesource.com/v8/v8/+/e538b70e1a45289dfe0fa9789563f023a5e9c22b TBR=jbroman@chromium.org,bradnelson@chromium.org,machenbach@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:6079 Review-Url: https://codereview.chromium.org/2762273002 Cr-Commit-Position: refs/heads/master@{#43994}
-
machenbach authored
Revert of [wasm] Transferrable modules (patchset #13 id:280001 of https://codereview.chromium.org/2748473004/ ) Reason for revert: Breaks layout tests: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/14312 See https://github.com/v8/v8/wiki/Blink-layout-tests Original issue's description: > [wasm] Transferrable modules > > We want to restrict structured cloning in Chrome to: > - postMessage senders and receivers that are co-located > in the same process > - indexedDB (just https). > > For context, on the Chrome side, we will achieve the postMessage part > by using a mechanism similar to transferrables: the > SerializedScriptValue will have a list of wasm modules, separate from > the serialized data stream; and this list won't be copied cross > process boundaries. The IDB part is achieved by explicitly opting in > reading/writing to the serialization stream. To block attack vectors > in IPC cases, the default for deserialization will be to expect data > in the wasm transfers list. > > This change is the V8 side necessary to enabling this design. We > introduce TransferrableModule, an opaque datatype exposed to the > embedder. Internally, TransferrableModules are just serialized data, > because we don't have a better mechanism, at the moment, for > de-contextualizing/re-contextualizing wasm modules (wrt Isolate and > Context). > > The chrome defaults will be implemented in the > serialization/deserialization delegates on that side. For the v8 side > of things, in the absence of a serialization delegate, the V8 > serializer will write to serialization stream. In the absence of a > deserialization delegate, the deserializer won't work. This asymmetry > is intentional - it communicates to the embedder the need to make a > policy decision, otherwise wasm serialization/deserialization won't > work "out of the box". > > BUG=v8:6079 > > Review-Url: https://codereview.chromium.org/2748473004 > Cr-Commit-Position: refs/heads/master@{#43955} > Committed: https://chromium.googlesource.com/v8/v8/+/99743ad460ea5b9795ba9d70a074e75d7362a3d1 TBR=jbroman@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:6079 Review-Url: https://codereview.chromium.org/2762163002 Cr-Commit-Position: refs/heads/master@{#43981}
-
- 20 Mar, 2017 1 commit
-
-
mtrofin authored
We want to restrict structured cloning in Chrome to: - postMessage senders and receivers that are co-located in the same process - indexedDB (just https). For context, on the Chrome side, we will achieve the postMessage part by using a mechanism similar to transferrables: the SerializedScriptValue will have a list of wasm modules, separate from the serialized data stream; and this list won't be copied cross process boundaries. The IDB part is achieved by explicitly opting in reading/writing to the serialization stream. To block attack vectors in IPC cases, the default for deserialization will be to expect data in the wasm transfers list. This change is the V8 side necessary to enabling this design. We introduce TransferrableModule, an opaque datatype exposed to the embedder. Internally, TransferrableModules are just serialized data, because we don't have a better mechanism, at the moment, for de-contextualizing/re-contextualizing wasm modules (wrt Isolate and Context). The chrome defaults will be implemented in the serialization/deserialization delegates on that side. For the v8 side of things, in the absence of a serialization delegate, the V8 serializer will write to serialization stream. In the absence of a deserialization delegate, the deserializer won't work. This asymmetry is intentional - it communicates to the embedder the need to make a policy decision, otherwise wasm serialization/deserialization won't work "out of the box". BUG=v8:6079 Review-Url: https://codereview.chromium.org/2748473004 Cr-Commit-Position: refs/heads/master@{#43955}
-
- 22 Feb, 2017 1 commit
-
-
Ross McIlroy authored
In order to use the IdentityMap in the CompilerDispatcher the following support is added: - Support for deleting entries - Support for iterating through the entries. - Support for AllocationPolicy to enable non-zone allocation of backing stores. - Also refactors the code a bit. BUG=v8:5203 Change-Id: I8b616cba8ae9dc22a7f4d76070fbb318c4edc80d Reviewed-on: https://chromium-review.googlesource.com/444409Reviewed-by:
Ben Titzer <titzer@chromium.org> Reviewed-by:
Jochen Eisinger <jochen@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#43362}
-
- 17 Feb, 2017 1 commit
-
-
addaleax authored
Add `ValueSerializer::SetTreatArrayBufferViewsAsHostObjects()` which instructs the `ValueSerializer` to treat ArrayBufferView objects as host objects. BUG=v8:5926 Review-Url: https://codereview.chromium.org/2696133007 Cr-Commit-Position: refs/heads/master@{#43281}
-
- 01 Feb, 2017 1 commit
-
-
jbroman authored
This avoids the need to pull in the UTF-8 encoding code from the public API, and allows it to take advantage of any supported way that i::String can be encoded (one- or two-byte). Backward compatibility is maintained, but this is the behavior beginning with this version. BUG=chromium:686159 Review-Url: https://codereview.chromium.org/2665653004 Cr-Commit-Position: refs/heads/master@{#42872}
-
- 28 Jan, 2017 1 commit
-
-
jbroman authored
memcpy is faster than UTF-8 encoding/decoding. This yields 10-20% wins on serializing and deserializing long ASCII strings, according to blink_perf.bindings -- and these are already in a fast path where the entire string is known to be ASCII (but this has to be checked). The win may be larger for strings in Latin-1 but not ASCII (though I suspect this is an uncommon case). A change is also made to make ValueSerializerTest.EncodeTwoByteStringUsesPadding survive wire format version number changes. This is the first of a series of wire format changes from the previous Blink format. The deserializer continues to be able to read the old format, but Chromium M56 will no longer be able to read the messages written by this, in M58. BUG=chromium:686159 Review-Url: https://codereview.chromium.org/2658793004 Cr-Commit-Position: refs/heads/master@{#42753}
-
- 27 Jan, 2017 1 commit
-
-
binji authored
Review-Url: https://codereview.chromium.org/2643723010 Cr-Commit-Position: refs/heads/master@{#42749}
-
- 03 Jan, 2017 1 commit
-
-
binji authored
This behavior changed recently. SharedArrayBuffers should not be put in the transfer list, because they are not detached, and that is the meaning of being in the transfer list. This is the V8 side of the change, the Blink side will come next. Reland of https://codereview.chromium.org/2570433005, it was reverted because of a Blink-side test failure which has been temporarily disabled; see https://codereview.chromium.org/2590003002. BUG=https://bugs.chromium.org/p/chromium/issues/detail?id=676063 Review-Url: https://codereview.chromium.org/2594793005 Cr-Commit-Position: refs/heads/master@{#42054}
-
- 16 Dec, 2016 1 commit
-
-
machenbach authored
Revert of Disallow passing a SharedArrayBuffer in the transfer list. (patchset #4 id:60001 of https://codereview.chromium.org/2570433005/ ) Reason for revert: Breaks layout tests: https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/12098 See: https://github.com/v8/v8/wiki/Blink-layout-tests Original issue's description: > Disallow passing a SharedArrayBuffer in the transfer list. > > This behavior changed recently. SharedArrayBuffers should not be put in the > transfer list, because they are not detached, and that is the meaning of being > in the transfer list. > > This is the V8 side of the change, the Blink side will come next. > > Review-Url: https://codereview.chromium.org/2570433005 > Cr-Commit-Position: refs/heads/master@{#41740} > Committed: https://chromium.googlesource.com/v8/v8/+/1c5e1504e0305363cd262f1706cbd63f9a62ae46 TBR=jbroman@chromium.org,jkummerow@chromium.org,binji@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2579963002 Cr-Commit-Position: refs/heads/master@{#41744}
-
- 15 Dec, 2016 1 commit
-
-
binji authored
This behavior changed recently. SharedArrayBuffers should not be put in the transfer list, because they are not detached, and that is the meaning of being in the transfer list. This is the V8 side of the change, the Blink side will come next. Review-Url: https://codereview.chromium.org/2570433005 Cr-Commit-Position: refs/heads/master@{#41740}
-
- 12 Nov, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2492943002 Cr-Commit-Position: refs/heads/master@{#40943}
-
- 04 Nov, 2016 1 commit
-
-
jbroman authored
Compatible with the current (unshipped) Blink implementation. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2471923002 Cr-Commit-Position: refs/heads/master@{#40775}
-
- 04 Oct, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2386233002 Cr-Commit-Position: refs/heads/master@{#39955}
-
- 20 Sep, 2016 1 commit
-
-
heimbuef authored
This is some initial cleanup to keep /src clean. The AccountingAllocator is actually exclusively used by zones and this common subfolder makes that more clear. BUG=v8:5409 Review-Url: https://codereview.chromium.org/2344143003 Cr-Commit-Position: refs/heads/master@{#39558}
-
- 17 Sep, 2016 1 commit
-
-
jbroman authored
In practice this is a dense array, because there is currently no provision in the format for assigning IDs other than sequentially to every object. Thus a FixedArray is more efficient than a general dictionary. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2342293003 Cr-Commit-Position: refs/heads/master@{#39486}
-
- 14 Sep, 2016 3 commits
-
-
jbroman authored
Similar to json-parser. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2334353002 Cr-Commit-Position: refs/heads/master@{#39429}
-
jbroman authored
This exposes an interface for the embedder to provide a delegate which can serialize or deserialize embedder-specific objects, like Blink's DOM wrappers. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2327653002 Cr-Commit-Position: refs/heads/master@{#39422}
-
jbroman authored
json-parser does the same thing. This drastically reduces GC cost when deserializing objects large enough that multiple collections are likely (since it saves the effort to move them to the old generation, when we know that the objects we create will persist at least until the deserializer finishes). The threshold was chosen to match json-parser. This patch reduces deserialization time on a large blob of JSON-y data by approximately 30%. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2336973004 Cr-Commit-Position: refs/heads/master@{#39396}
-
- 06 Sep, 2016 1 commit
-
-
jbroman authored
This yields a ~20% serialization time improvement on typical JSON-esque data. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2304563004 Cr-Commit-Position: refs/heads/master@{#39221}
-
- 02 Sep, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757,chromium:641964 Review-Url: https://codereview.chromium.org/2307603002 Cr-Commit-Position: refs/heads/master@{#39140}
-
- 30 Aug, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2290753002 Cr-Commit-Position: refs/heads/master@{#39017}
-
- 29 Aug, 2016 1 commit
-
-
jbroman authored
The format of this is a little strange, and has to do with the previous implementation maintaining a "stack" of objects as it works. As a result, the format writes the array buffer before giving any hint that the reason for doing so is to obtain a view wrapping it. Handling this without creating an explicit on-heap stack requires checking whether the next tag is 'V' after obtaining an array buffer. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2287653002 Cr-Commit-Position: refs/heads/master@{#38984}
-
- 26 Aug, 2016 1 commit
-
-
jbroman authored
The embedder is expected to arrange for the array buffer contents to be transferred into a v8::ArrayBuffer in the receiving context (generally by assuming ownership of the externalized backing store). BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2275033003 Cr-Commit-Position: refs/heads/master@{#38948}
-
- 25 Aug, 2016 2 commits
-
-
jbroman authored
Suitably scary warnings attached, as this will yet evolve (notably to handle host objects, which are not currently handled). Unit tests adjusted to use the public version of ValueSerializer, eliminating any need they have to access v8::internal. With this, Blink can begin using this code experimentally behind a flag as it develops. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2274693002 Cr-Commit-Position: refs/heads/master@{#38915}
-
jbroman authored
Transferral is not included in this CL, nor is SharedArrayBuffer. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2264403004 Cr-Commit-Position: refs/heads/master@{#38913}
-
- 24 Aug, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2269923004 Cr-Commit-Position: refs/heads/master@{#38871}
-
- 23 Aug, 2016 2 commits
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2262013002 Cr-Commit-Position: refs/heads/master@{#38835}
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2265603002 Cr-Commit-Position: refs/heads/master@{#38830}
-
- 22 Aug, 2016 1 commit
-
-
jbroman authored
BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2255973005 Cr-Commit-Position: refs/heads/master@{#38795}
-
- 18 Aug, 2016 3 commits
-
-
jbroman authored
The current "dense" format is not expressive enough to distinguish between an element that is not defined and one that has the value "undefined", but in this CL the existing behaviour of Blink is used for such cases. Format changes to fix these issues could be made later on. Not included in this CL is compatibility with version 0 arrays. Those will be implemented in a separate CL. BUG=chromium:148757 Committed: https://crrev.com/2e000127df2e88e31d352ef70af397741d1f2298 Review-Url: https://codereview.chromium.org/2259633002 Cr-Original-Commit-Position: refs/heads/master@{#38729} Cr-Commit-Position: refs/heads/master@{#38732}
-
jbroman authored
Revert of Blink-compatible serialization of arrays, both dense and sparse. (patchset #6 id:100001 of https://codereview.chromium.org/2259633002/ ) Reason for revert: Broke MIPS compile due to an uninitialization warning: https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/3110/steps/compile/logs/stdio Original issue's description: > Blink-compatible serialization of arrays, both dense and sparse. > > The current "dense" format is not expressive enough to distinguish between > an element that is not defined and one that has the value "undefined", > but in this CL the existing behaviour of Blink is used for such cases. > Format changes to fix these issues could be made later on. > > Not included in this CL is compatibility with version 0 arrays. > Those will be implemented in a separate CL. > > BUG=chromium:148757 > > Committed: https://crrev.com/2e000127df2e88e31d352ef70af397741d1f2298 > Cr-Commit-Position: refs/heads/master@{#38729} TBR=jkummerow@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2255313002 Cr-Commit-Position: refs/heads/master@{#38730}
-
jbroman authored
The current "dense" format is not expressive enough to distinguish between an element that is not defined and one that has the value "undefined", but in this CL the existing behaviour of Blink is used for such cases. Format changes to fix these issues could be made later on. Not included in this CL is compatibility with version 0 arrays. Those will be implemented in a separate CL. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2259633002 Cr-Commit-Position: refs/heads/master@{#38729}
-
- 17 Aug, 2016 2 commits
-
-
jbroman authored
The "version 0" format did not deal with references, and used a stack model to deserialize objects (conceptually, a postorder tree traversal). This requires an explicit stack, so special logic is added to decode this format. All subsequent versions also put an object marker at the beginning, which is equivalent to how the current version serializes. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2248893003 Cr-Commit-Position: refs/heads/master@{#38686}
-
jbroman authored
As part of this CL, object reference tracking is implemented (and tested with a self-referential object). This sort of reference tracking will be shared with other receivers (array, date, regexp and host objects). Not included in this CL is compatibility with version-0 objects (which don't support a non-tree object graph, and require a little stack to correctly deserialize). BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2246093003 Cr-Commit-Position: refs/heads/master@{#38683}
-
- 15 Aug, 2016 1 commit
-
-
jbroman authored
This includes UTF-8 strings and two-byte strings, both length-delimited (in bytes, not characters). Two-byte strings are written/read in host byte order. BUG=chromium:148757 Review-Url: https://codereview.chromium.org/2245753002 Cr-Commit-Position: refs/heads/master@{#38636}
-