|
|
bindings: Use ExceptionMessages when an interface/callback conversion fails.
https://codereview.chromium.org/2802223002 ("bindings: Throw a type error if
converting an interface or callback function fails") introduced a 32kb size
regression on release Android builds (is_official_build=true), as the new
error strings being thrown as type errors could not be shared and all made
it into the .rodata section.
Start using ExceptionMessages::FailedToConstruct() in the error messages.
Not only do we use the existing error infrastructure, but it allows us to
separate the part that always changes (the callback or interface name) from
the actual details (the "Unable to convert value" bit).
With commit 07c092298a6243fc2c829e517cf2b19f4caea26c ("Fetch: Make Headers'
constructor match the current spec IDL") as a baseline, the following data
can be observed with //tools/binary_size/map2size.py and console.py:
* Reverting the changes from https://codereview.chromium.org/2802223002
versus this commit:
Section Sizes (Total=-168 bytes):
.bss: 0 bytes (not included in totals)
.data: 0 bytes (-0.0%)
.data.rel.ro: 0 bytes (-0.0%)
.data.rel.ro.local: 0 bytes (-0.0%)
.rodata: 256 bytes (-152.4%)
.text: -424 bytes (252.4%)
0 symbols added (+), 27 changed (~), 3 removed (-), 313837 unchanged (not shown)
Showing 30 symbols with total size: -160 bytes
.text=-416 bytes .rodata=256 bytes other=0 bytes total=-160 bytes
Number of object files: 28
* Commit b1bbca356abfa6f8fdec3cd5815f18b164491a45 versus this commit:
Section Sizes (Total=-33,704 bytes):
.bss: 0 bytes (not included in totals)
.data: 0 bytes (-0.0%)
.data.rel.ro: 0 bytes (-0.0%)
.data.rel.ro.local: 0 bytes (-0.0%)
.rodata: -33,280 bytes (98.7%)
.text: -424 bytes (1.3%)
0 symbols added (+), 27 changed (~), 3 removed (-), 313837 unchanged (not shown)
Showing 30 symbols with total size: -33696 bytes
.text=-416 bytes .rodata=-32.5kb other=0 bytes total=-32.9kb
Number of object files: 28
BUG= 690428, 710035
R=agrieve@chromium.org,bashi@chromium.org,haraken@chromium.org,jbroman@chromium.org,yukishiino@chromium.org
Review-Url: https://codereview.chromium.org/2809003004
Cr-Commit-Position: refs/heads/master@{#463753}
Committed: https://chromium.googlesource.com/chromium/src/+/81c4e4ab9d81757ce3dcb49185be46c880f3f22a
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+188 lines, -92 lines) |
Patch |
 |
M |
third_party/WebKit/Source/bindings/core/v8/ExceptionMessages.h
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/ExceptionMessages.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/core/v8/NativeValueTraitsImplTest.cpp
|
View
|
1
2
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
Total messages: 27 (17 generated)
|