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

Issue 718383003: bindings: fixed incorrect dependency of SerializedScriptValue. (Closed)

Created:
6 years, 1 month ago by tasak
Modified:
6 years ago
Reviewers:
haraken, jsbell
CC:
blink-reviews, michaeln, jsbell+serviceworker_chromium.org, serviceworker-reviews, arv+blink, tzik, blink-reviews-events_chromium.org, sof, eae+blinkwatch, kinuko+serviceworker, nhiroki, falken, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews-bindings_chromium.org, cmumford, horo+watch_chromium.org, dgrogan, jsbell+idb_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

bindings: fixed incorrect dependency of SerializedScriptValue. SerializedScriptValue in bindings/core depends on V8DOMFileSystem and V8CryptoKey in bindings/modules. This is not allowed. So: - Added factory class, SerializedScriptValueFactory class and SerializedScriptValueForModulesFactory, which inherits from SerializedScriptValueFactory. - SerializedScriptValue is created by the factory classes. e.g. SerializedScriptValueFactory::factory().create(). - When initializing modules, make blink to use SerializedScriptValueForModulesFactory instead of SerializedScriptValueFactory. - SerializedScriptValueFactory uses core part of SerializedScriptValue, i.e. Writer, Reader, Serializer and Deserializer. These are moved into ScriptValueSerializer.{h,cpp}. - SerializedScriptValueForModulesFactory uses modules part of SerializedScriptValue, i.e. WriterForModules, ReaderForModules, SerializerForModules, and DeserializerForModules. These are moved into ScriptValueSerializerForModules.{h,cpp}. - Each "for-modules" class inherits from its core part, e.g. WriterForModules inherits from Writer. BUG=358074 TEST=fast/js/structured-clone.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=186086

Patch Set 1 #

Patch Set 2 : #

Total comments: 27

Patch Set 3 : #

Total comments: 3

Patch Set 4 : Removed SerializedScriptValueForModules #

Patch Set 5 : Fixed greyObject #

Patch Set 6 : Added fast/js/structured-clone.html #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1357 lines, -930 lines) Patch
A LayoutTests/fast/js/structured-clone.html View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
M Source/bindings/core/DEPS View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M Source/bindings/core/v8/PostMessage.h View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/core/v8/ScriptValueSerializer.h View 1 2 3 4 5 24 chunks +57 lines, -79 lines 0 comments Download
M Source/bindings/core/v8/ScriptValueSerializer.cpp View 1 2 3 4 5 77 chunks +153 lines, -628 lines 0 comments Download
M Source/bindings/core/v8/SerializationTag.h View 1 2 2 chunks +0 lines, -59 lines 0 comments Download
M Source/bindings/core/v8/SerializedScriptValue.h View 1 2 3 4 5 4 chunks +13 lines, -20 lines 0 comments Download
M Source/bindings/core/v8/SerializedScriptValue.cpp View 1 2 3 4 5 5 chunks +10 lines, -113 lines 0 comments Download
A Source/bindings/core/v8/SerializedScriptValueFactory.h View 1 2 3 1 chunk +69 lines, -0 lines 0 comments Download
A Source/bindings/core/v8/SerializedScriptValueFactory.cpp View 1 2 3 1 chunk +152 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/SerializedScriptValueTest.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/custom/V8CustomEventCustom.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/custom/V8HistoryCustom.cpp View 1 2 3 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/custom/V8MessageEventCustom.cpp View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/custom/V8PopStateEventCustom.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/core/v8/custom/V8WindowCustom.cpp View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/core/v8/v8.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/modules/v8/IDBBindingUtilities.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/modules/v8/ModuleBindingsInitializer.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
A Source/bindings/modules/v8/ScriptValueSerializerForModules.h View 1 2 3 4 1 chunk +92 lines, -0 lines 0 comments Download
A Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp View 1 2 3 4 1 chunk +596 lines, -0 lines 0 comments Download
A Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.h View 1 2 3 1 chunk +30 lines, -0 lines 0 comments Download
A Source/bindings/modules/v8/SerializedScriptValueForModulesFactory.cpp View 1 2 3 1 chunk +78 lines, -0 lines 0 comments Download
M Source/bindings/modules/v8/v8.gni View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/modules/v8/v8.gypi View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 4 5 3 chunks +3 lines, -2 lines 0 comments Download
M Source/core/dom/MessagePort.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/page/EventSource.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.cpp View 1 2 2 chunks +2 lines, -1 line 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainer.cpp View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M Source/web/WebSerializedScriptValue.cpp View 1 2 2 chunks +4 lines, -3 lines 0 comments Download
M Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 18 (3 generated)
tasak
6 years, 1 month ago (2014-11-13 08:11:08 UTC) #2
tasak
Would you review this CL? https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/ScriptValueSerializer.cpp File Source/bindings/core/v8/ScriptValueSerializer.cpp (left): https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/ScriptValueSerializer.cpp#oldcode207 Source/bindings/core/v8/ScriptValueSerializer.cpp:207: Moved to ScriptValueSerializerForModules.cpp https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/SerializedScriptValue.cpp ...
6 years, 1 month ago (2014-11-14 08:07:40 UTC) #4
haraken
The approach looks good. https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/PostMessage.h File Source/bindings/core/v8/PostMessage.h (right): https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/PostMessage.h#newcode35 Source/bindings/core/v8/PostMessage.h:35: RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::factory().create(info[0], &ports, ...
6 years, 1 month ago (2014-11-17 01:27:50 UTC) #5
tasak
Thank you for review. https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/PostMessage.h File Source/bindings/core/v8/PostMessage.h (right): https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/PostMessage.h#newcode35 Source/bindings/core/v8/PostMessage.h:35: RefPtr<SerializedScriptValue> message = SerializedScriptValueFactory::factory().create(info[0], &ports, ...
6 years, 1 month ago (2014-11-17 08:42:30 UTC) #6
haraken
https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/SerializedScriptValueFactory.cpp File Source/bindings/core/v8/SerializedScriptValueFactory.cpp (right): https://codereview.chromium.org/718383003/diff/20001/Source/bindings/core/v8/SerializedScriptValueFactory.cpp#newcode17 Source/bindings/core/v8/SerializedScriptValueFactory.cpp:17: PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(v8::Handle<v8::Value> value, MessagePortArray* messagePorts, ArrayBufferArray* arrayBuffers, ExceptionState& exceptionState, ...
6 years, 1 month ago (2014-11-17 08:49:53 UTC) #7
jsbell
Introducing the SerializedScriptValueForModules type feels a bit odd for some reason. The implementation is nearly ...
6 years, 1 month ago (2014-11-17 23:46:02 UTC) #8
jsbell
https://codereview.chromium.org/718383003/diff/40001/Source/bindings/core/v8/ScriptValueSerializer.cpp File Source/bindings/core/v8/ScriptValueSerializer.cpp (right): https://codereview.chromium.org/718383003/diff/40001/Source/bindings/core/v8/ScriptValueSerializer.cpp#newcode636 Source/bindings/core/v8/ScriptValueSerializer.cpp:636: && m_objectPool.tryGet(value.As<v8::Object>(), &objectReference)) { On 2014/11/17 23:46:02, jsbell wrote: ...
6 years, 1 month ago (2014-11-18 19:30:47 UTC) #9
tasak
Thank you for review. > Could those be accessed through the factory instead in SerializedScriptValue? ...
6 years, 1 month ago (2014-11-19 05:12:16 UTC) #10
tasak
jsbell, would you see the latest patch?
6 years, 1 month ago (2014-11-21 04:06:45 UTC) #11
jsbell
Sorry about the delay! doSerialize/doSerializeValue looks good. (Looks like this will need a minor rebasing ...
6 years, 1 month ago (2014-11-21 22:28:31 UTC) #12
jsbell
lgtm
6 years, 1 month ago (2014-11-21 22:28:42 UTC) #13
tasak
Thank you for review. On 2014/11/21 22:28:31, jsbell wrote: > Sorry about the delay! > ...
6 years ago (2014-11-27 04:32:51 UTC) #14
haraken
rubberstamp LGTM based on jsbell's LG.
6 years ago (2014-11-27 04:49:38 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/718383003/100001
6 years ago (2014-11-27 04:50:45 UTC) #17
commit-bot: I haz the power
6 years ago (2014-11-27 06:00:52 UTC) #18
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=186086

Powered by Google App Engine
This is Rietveld 408576698