Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Issue 2749503002: [wasm] enable wasm structured cloning in specific cases (Closed)

Created:
3 years, 9 months ago by Mircea Trofin
Modified:
3 years, 8 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, chromium-reviews, cmumford, haraken, jbroman+watch_chromium.org, jsbell+idb_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[wasm] enable wasm structured cloning in specific cases Using the mechanism introduced in V8 with https://codereview.chromium.org/2748473004, we restrict wasm structured cloning to: 1) senders and receivers in the same process. This is achieved, similar to shared array buffers, by defaulting wasm serialization to using a transfer list internal to SerializedScriptValue. The transfer list is not IPC-ed, which achieves the desired restriction 2) IndexedDB, when the origin is secure. This is achieved by explicitly opting in, on both serialization and deserialization side, into inline (i.e. in the stream) (de)serialization, if the origin is secure. This last check is done on the serialization side, which should be sufficient, since we trust the IDB layer. In the process of adding tests for in-process iframe, I found crbug.com/700788. Left the test in the CL, but currently disabled. Also, didn't add a cross-origin iframe test because, currently, that wouldn't add value (because of this bug) BUG=chromium:703650 Review-Url: https://codereview.chromium.org/2749503002 Cr-Commit-Position: refs/heads/master@{#460328} Committed: https://chromium.googlesource.com/chromium/src/+/110b0ecc2600e97fdc7496fb99fb309cab806242

Patch Set 1 #

Patch Set 2 : update #

Patch Set 3 : moved frame.html #

Total comments: 18

Patch Set 4 : feedback #

Patch Set 5 : fix negative test #

Total comments: 2

Patch Set 6 : rebase #

Patch Set 7 : fixed idb test #

Total comments: 21

Patch Set 8 : feedback #

Patch Set 9 : async #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -15 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/compile_worker.js View 1 chunk +11 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/resources/blank.html View 1 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/resources/frame.html View 1 2 3 4 5 6 7 1 chunk +18 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/resources/incrementer.wasm View 1 Binary file 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/resources/service-worker.js View 1 1 chunk +26 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_negative_test.html View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_test.html View 1 2 3 4 5 6 7 1 chunk +6 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_test.js View 1 2 3 4 5 6 7 4 chunks +29 lines, -8 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html View 1 2 3 4 5 6 7 8 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/wasm/wasm_serialization_tests.js View 1 2 chunks +2 lines, -2 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/wasm/wasm_service_worker_test.html View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h View 1 2 3 4 5 6 7 5 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueDeserializer.cpp View 1 2 3 4 5 6 7 2 chunks +12 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.h View 1 2 3 4 5 3 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/serialization/V8ScriptValueSerializer.cpp View 1 2 3 4 5 6 7 2 chunks +19 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/testing/Internals.idl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.cpp View 1 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (33 generated)
jsbell
I'm confused about the intended behavior when attempting to store modules to Indexed DB in ...
3 years, 9 months ago (2017-03-22 17:41:07 UTC) #13
blink-reviews
We don't yet have a spec, Domenic is ironing that one out. Happy to throw ...
3 years, 9 months ago (2017-03-22 18:08:41 UTC) #14
chromium-reviews
We don't yet have a spec, Domenic is ironing that one out. Happy to throw ...
3 years, 9 months ago (2017-03-22 18:08:41 UTC) #15
jsbell
On 2017/03/22 18:08:41, chromium-reviews wrote: > We don't yet have a spec, Domenic is ironing ...
3 years, 9 months ago (2017-03-22 19:04:46 UTC) #16
jsbell
I believe the relevant spec language would go into WASM itself. e.g. Per https://html.spec.whatwg.org/multipage/infrastructure.html#serializable-objects * ...
3 years, 9 months ago (2017-03-22 21:05:47 UTC) #17
jbroman
On 2017/03/22 at 21:05:47, jsbell wrote: > I believe the relevant spec language would go ...
3 years, 9 months ago (2017-03-22 21:09:41 UTC) #18
Mircea Trofin
incorporated feedback, except for the error behavior for IDB, where we're waiting for final conclusion. ...
3 years, 9 months ago (2017-03-22 23:31:21 UTC) #21
domenic
On 2017/03/22 at 21:09:41, jbroman wrote: > On 2017/03/22 at 21:05:47, jsbell wrote: > > ...
3 years, 9 months ago (2017-03-22 23:45:08 UTC) #22
Mircea Trofin
On 2017/03/22 23:45:08, domenic wrote: > On 2017/03/22 at 21:09:41, jbroman wrote: > > On ...
3 years, 9 months ago (2017-03-23 00:53:44 UTC) #23
domenic
On 2017/03/23 at 00:53:44, mtrofin wrote: > Should I understand, then, that we can close ...
3 years, 9 months ago (2017-03-23 00:57:39 UTC) #27
jsbell
On 2017/03/23 00:57:39, domenic wrote: > Well, I think we need jsbell to spec it ...
3 years, 9 months ago (2017-03-23 16:16:58 UTC) #32
Mircea Trofin
On 2017/03/23 16:16:58, jsbell wrote: > On 2017/03/23 00:57:39, domenic wrote: > > Well, I ...
3 years, 9 months ago (2017-03-23 18:07:16 UTC) #33
jbroman
On 2017/03/23 at 18:07:16, mtrofin wrote: > On 2017/03/23 16:16:58, jsbell wrote: > > On ...
3 years, 9 months ago (2017-03-23 18:08:35 UTC) #34
jsbell
On 2017/03/23 18:07:16, Mircea Trofin wrote: > Would it be preferable we have a mode ...
3 years, 9 months ago (2017-03-23 19:44:45 UTC) #35
Mircea Trofin
On 2017/03/23 19:44:45, jsbell wrote: > On 2017/03/23 18:07:16, Mircea Trofin wrote: > > Would ...
3 years, 9 months ago (2017-03-23 21:53:59 UTC) #36
jsbell
Yeah, I'm fine with moving forward, assuming we address before the branch. Indexed DB tests ...
3 years, 9 months ago (2017-03-24 16:51:13 UTC) #37
Mircea Trofin
Jeremy - are you OK to move forward with this CL? Thanks! https://codereview.chromium.org/2749503002/diff/80001/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_test.js File third_party/WebKit/LayoutTests/http/tests/wasm/wasm_indexeddb_test.js ...
3 years, 9 months ago (2017-03-24 22:52:07 UTC) #40
Mircea Trofin
On 2017/03/24 22:52:07, Mircea Trofin wrote: > Jeremy - are you OK to move forward ...
3 years, 9 months ago (2017-03-27 18:21:13 UTC) #43
jbroman
I don't see the logic for (1) in this CL. Are you just relying on ...
3 years, 9 months ago (2017-03-27 18:50:52 UTC) #44
Mircea Trofin
The logic for (1) is, as you pointed out, done by dropping the transfer list ...
3 years, 9 months ago (2017-03-27 20:52:33 UTC) #47
jbroman
ok lgtm https://codereview.chromium.org/2749503002/diff/120001/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html File third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html (right): https://codereview.chromium.org/2749503002/diff/120001/third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html#newcode7 third_party/WebKit/LayoutTests/http/tests/wasm/wasm_local_iframe_test.html:7: function TestSendToIFrame() { On 2017/03/27 at 20:52:32, ...
3 years, 8 months ago (2017-03-28 15:27:25 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2749503002/160001
3 years, 8 months ago (2017-03-29 06:41:10 UTC) #53
commit-bot: I haz the power
3 years, 8 months ago (2017-03-29 08:28:18 UTC) #56
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/110b0ecc2600e97fdc7496fb99fb...

Powered by Google App Engine
This is Rietveld 408576698