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

Issue 1893983002: Simplify handling of Transferable objects while (de)serializing. (Closed)

Created:
4 years, 8 months ago by sof
Modified:
4 years, 8 months ago
Reviewers:
haraken, xidachen, jsbell
CC:
chromium-reviews, kinuko+worker_chromium.org, jsbell+serviceworker_chromium.org, haraken, serviceworker-reviews, tzik, sof, eae+blinkwatch, kinuko+serviceworker, nhiroki, falken, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, michaeln, blink-reviews, horo+watch_chromium.org, blink-worker-reviews_chromium.org, rwlbuis, xidachen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Simplify handling of Transferable objects while (de)serializing. Avoid unnecessary allocations and abstractions in the handling of transferables. The Transferables now collates the different kinds of objects that can be transferred via postMessage(). R= BUG=haraken Committed: https://crrev.com/ba7d116f43912adfee56093f9b9389196d0503fd Cr-Commit-Position: refs/heads/master@{#387867}

Patch Set 1 #

Total comments: 4

Patch Set 2 : remove Transferable.cpp, not needed after all. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+228 lines, -412 lines) Patch
M third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/DocumentWriteEvaluator.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.h View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/ScriptValueSerializer.cpp View 3 chunks +29 lines, -25 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h View 4 chunks +5 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp View 1 8 chunks +67 lines, -82 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.h View 2 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp View 4 chunks +14 lines, -16 lines 0 comments Download
D third_party/WebKit/Source/bindings/core/v8/Transferable.h View 1 chunk +0 lines, -26 lines 0 comments Download
D third_party/WebKit/Source/bindings/core/v8/TransferableArrayBuffer.h View 1 chunk +0 lines, -54 lines 0 comments Download
D third_party/WebKit/Source/bindings/core/v8/TransferableImageBitmap.h View 1 chunk +0 lines, -54 lines 0 comments Download
D third_party/WebKit/Source/bindings/core/v8/TransferableMessagePort.h View 1 chunk +0 lines, -54 lines 0 comments Download
A third_party/WebKit/Source/bindings/core/v8/Transferables.h View 1 1 chunk +42 lines, -0 lines 2 comments Download
M third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp View 3 chunks +5 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/bindings/core/v8/v8.gypi View 1 1 chunk +1 line, -4 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/bindings/scripts/v8_methods.py View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/bindings/templates/methods.cpp View 1 chunk +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp View 2 chunks +5 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/core/dom/MessagePort.h View 4 chunks +3 lines, -5 lines 1 comment Download
M third_party/WebKit/Source/core/dom/MessagePort.cpp View 4 chunks +18 lines, -22 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.h View 1 4 chunks +3 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/frame/DOMWindow.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/DedicatedWorkerGlobalScope.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerBase.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/workers/InProcessWorkerBase.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 15 (7 generated)
sof
please take a look.
4 years, 8 months ago (2016-04-17 20:03:02 UTC) #2
haraken
LGTM. This is a great simplification! https://codereview.chromium.org/1893983002/diff/1/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp File third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/1893983002/diff/1/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp#newcode68 third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp:68: // used in ...
4 years, 8 months ago (2016-04-17 23:57:22 UTC) #3
sof
https://codereview.chromium.org/1893983002/diff/1/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp File third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp (right): https://codereview.chromium.org/1893983002/diff/1/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp#newcode68 third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.cpp:68: // used in a context other then Worker's onmessage ...
4 years, 8 months ago (2016-04-18 06:41:56 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1893983002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1893983002/20001
4 years, 8 months ago (2016-04-18 07:12:33 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 8 months ago (2016-04-18 07:39:37 UTC) #10
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/ba7d116f43912adfee56093f9b9389196d0503fd Cr-Commit-Position: refs/heads/master@{#387867}
4 years, 8 months ago (2016-04-18 07:41:22 UTC) #12
xidachen
https://codereview.chromium.org/1893983002/diff/20001/third_party/WebKit/Source/bindings/core/v8/Transferables.h File third_party/WebKit/Source/bindings/core/v8/Transferables.h (right): https://codereview.chromium.org/1893983002/diff/20001/third_party/WebKit/Source/bindings/core/v8/Transferables.h#newcode22 third_party/WebKit/Source/bindings/core/v8/Transferables.h:22: class CORE_EXPORT Transferables final { Question: With this class ...
4 years, 8 months ago (2016-04-18 12:13:13 UTC) #14
sof
4 years, 8 months ago (2016-04-18 18:28:02 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/1893983002/diff/20001/third_party/WebKit/Sour...
File third_party/WebKit/Source/bindings/core/v8/Transferables.h (right):

https://codereview.chromium.org/1893983002/diff/20001/third_party/WebKit/Sour...
third_party/WebKit/Source/bindings/core/v8/Transferables.h:22: class CORE_EXPORT
Transferables final {
On 2016/04/18 12:13:13, xidachen wrote:
> Question:
> 
> With this class under core/ and marked as final, how would it work if I want
to
> make something under modules/ to be transferable?

If you want to have such a thing, and it otherwise works out dependency-wise,
you can drop final and derive another STACK_ALLOCATED() transferable class. Or
just define the type in core/.

Powered by Google App Engine
This is Rietveld 408576698