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

Issue 725163002: bindings: Retires V8T::toEventTarget and reduces the binary size. (Closed)

Created:
6 years, 1 month ago by Yuki
Modified:
6 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink
Project:
blink
Visibility:
Public.

Description

bindings: Retires V8T::toEventTarget and reduces the binary size. We can calculate the pointer to EventTarget from a pointer to ScriptWrappableBase because EventTarget inherits from ScriptWrappableBase. So we don't need V8T::toEventTarget function for each V8T. This CL also reduces the binary size (static data size) of libblink_web.so packing several flags into bitfields. The reduced size is about 60kbytes, which covers http://crbug.com/409852 BUG=409852, 235436 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185437

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Addressed a review comment. #

Patch Set 4 : Synced. #

Patch Set 5 : Made enums unsigned to support MSVC. #

Patch Set 6 : Made bitfields be type of unsigned to support both of MSVC and Android. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+73 lines, -111 lines) Patch
M Source/bindings/core/v8/NPV8Object.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/core/v8/WrapperTypeInfo.h View 1 2 3 4 5 5 chunks +11 lines, -13 lines 0 comments Download
A Source/bindings/core/v8/WrapperTypeInfo.cpp View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/v8.gypi View 2 chunks +4 lines, -3 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 2 chunks +1 line, -1 line 0 comments Download
M Source/bindings/templates/interface.h View 1 chunk +0 lines, -3 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 2 chunks +1 line, -15 lines 0 comments Download
M Source/bindings/templates/interface_base.cpp View 3 chunks +1 line, -4 lines 0 comments Download
M Source/bindings/tests/results/core/V8ArrayBuffer.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8ArrayBufferView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8DataView.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8SVGTestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestException.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterface3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceDocument.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventConstructor.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp View 3 chunks +2 lines, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNode.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceNode.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestInterfaceWillBeGarbageCollected.cpp View 3 chunks +2 lines, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestNode.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestNode.cpp View 2 chunks +1 line, -6 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperations.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8TestTypedefs.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/modules/V8TestInterface5.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 9 (2 generated)
Yuki
Could you review this CL?
6 years, 1 month ago (2014-11-14 16:39:02 UTC) #2
haraken
https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.h File Source/bindings/core/v8/WrapperTypeInfo.h (right): https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.h#newcode79 Source/bindings/core/v8/WrapperTypeInfo.h:79: enum EventTargetInheritance { Would it be possible to avoid ...
6 years, 1 month ago (2014-11-14 16:43:07 UTC) #3
Yuki
https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.h File Source/bindings/core/v8/WrapperTypeInfo.h (right): https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.h#newcode79 Source/bindings/core/v8/WrapperTypeInfo.h:79: enum EventTargetInheritance { On 2014/11/14 16:43:07, haraken wrote: > ...
6 years, 1 month ago (2014-11-15 12:18:07 UTC) #4
haraken
LGTM https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.cpp File Source/bindings/core/v8/WrapperTypeInfo.cpp (right): https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.cpp#newcode14 Source/bindings/core/v8/WrapperTypeInfo.cpp:14: if (UNLIKELY(eventTargetInheritance == NotInheritFromEventTarget)) Drop UNLIKELY unless it ...
6 years, 1 month ago (2014-11-15 12:46:54 UTC) #5
Yuki
https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.cpp File Source/bindings/core/v8/WrapperTypeInfo.cpp (right): https://codereview.chromium.org/725163002/diff/20001/Source/bindings/core/v8/WrapperTypeInfo.cpp#newcode14 Source/bindings/core/v8/WrapperTypeInfo.cpp:14: if (UNLIKELY(eventTargetInheritance == NotInheritFromEventTarget)) On 2014/11/15 12:46:54, haraken wrote: ...
6 years, 1 month ago (2014-11-17 04:03:38 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/725163002/100001
6 years, 1 month ago (2014-11-17 12:25:43 UTC) #8
commit-bot: I haz the power
6 years, 1 month ago (2014-11-17 12:28:52 UTC) #9
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as 185437

Powered by Google App Engine
This is Rietveld 408576698