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

Issue 656073002: IDL: Use ALLOW_ONLY_INLINE_ALLOCATION() in dictionaries (Closed)

Created:
6 years, 2 months ago by bashi
Modified:
6 years, 2 months ago
Reviewers:
haraken, Jens Widell
CC:
blink-reviews, serviceworker-reviews, tzik, eae+blinkwatch, dgrogan, aandrey+blink_chromium.org, rwlbuis, jsbell+serviceworker_chromium.org, arv+blink, blink-reviews-css, blink-reviews-html_chromium.org, blink-reviews-dom_chromium.org, dglazkov+blink, Rik, blink-reviews-bindings_chromium.org, rune+blink, sof, nhiroki, darktears, jsbell+idb_chromium.org, michaeln, horo+watch_chromium.org, mkwst+moarreviews_chromium.org, falken, blink-reviews-events_chromium.org, ed+blinkwatch_opera.com, kinuko+serviceworker, Inactive, cmumford, apavlov+blink_chromium.org, kinuko+fileapi
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL: Use ALLOW_ONLY_INLINE_ALLOCATION() in dictionaries Before this CL, we allocate memory for IDL dictionaries each time we use them. For performance sensitive methods, this may not be acceptable. Avoid allocating them in the oilpan heap. Instead, put them on stack. Dictionaries can be a member of collections, so we use ALLOW_ONLY_INLINE_ALLOCATION(). Side effect of this change: If an impl class implements an IDL method which returns a dictionary, the impl method needs to take an argument for return value. This CL also add blank lines in generated dictionary impl classes for readability. BUG=321462 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=183855

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+301 lines, -248 lines) Patch
M Source/bindings/core/v8/V8BindingMacros.h View 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_dictionary.py View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 4 chunks +7 lines, -4 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 10 chunks +17 lines, -8 lines 0 comments Download
M Source/bindings/templates/dictionary_impl.h View 1 chunk +4 lines, -8 lines 0 comments Download
M Source/bindings/templates/dictionary_v8.h View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/templates/dictionary_v8.cpp View 1 3 chunks +16 lines, -11 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 1 chunk +3 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/core/TestDictionary.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/bindings/tests/idls/core/TestObject.idl View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/core/TestDictionary.h View 2 chunks +20 lines, -7 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestDictionary.h View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestDictionary.cpp View 1 2 chunks +121 lines, -82 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 4 chunks +25 lines, -13 lines 0 comments Download
M Source/core/css/FontFaceDescriptors.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/dom/DOMPointInit.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/ElementRegistrationOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/dom/MutationObserverInit.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/frame/ScrollOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/html/canvas/HitRegionOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/page/EventSourceInit.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/core/testing/DictionaryTest.h View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/testing/DictionaryTest.cpp View 1 chunk +18 lines, -20 lines 0 comments Download
M Source/core/testing/InternalDictionary.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/encoding/TextDecodeOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/encoding/TextDecoder.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/filesystem/FileSystemFlags.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/indexeddb/IDBIndexParameters.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/notifications/NotificationOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/serviceworkers/CacheQueryOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/serviceworkers/CacheTest.cpp View 8 chunks +23 lines, -23 lines 0 comments Download
M Source/modules/serviceworkers/RegistrationOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerClientQueryOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp View 2 chunks +6 lines, -6 lines 0 comments Download
M Source/modules/webmidi/MIDIOptions.idl View 1 chunk +1 line, -3 lines 0 comments Download
M Source/web/WebDocument.cpp View 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 11 (3 generated)
bashi
Haraken-san, PTAL?
6 years, 2 months ago (2014-10-15 13:08:01 UTC) #2
haraken
LGTM https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py File Source/bindings/scripts/v8_methods.py (right): https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py#newcode182 Source/bindings/scripts/v8_methods.py:182: 'use_argument_for_return_value': idl_type.is_dictionary, use_output_parameter_for_result ? 'argument' is a bit ...
6 years, 2 months ago (2014-10-15 14:38:29 UTC) #3
Jens Widell
https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py File Source/bindings/scripts/v8_methods.py (right): https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py#newcode313 Source/bindings/scripts/v8_methods.py:313: if method.idl_type and method.idl_type.is_dictionary: On 2014/10/15 14:38:28, haraken wrote: ...
6 years, 2 months ago (2014-10-15 15:39:17 UTC) #5
bashi
Thank you for reviews! https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py File Source/bindings/scripts/v8_methods.py (right): https://codereview.chromium.org/656073002/diff/1/Source/bindings/scripts/v8_methods.py#newcode182 Source/bindings/scripts/v8_methods.py:182: 'use_argument_for_return_value': idl_type.is_dictionary, On 2014/10/15 14:38:28, ...
6 years, 2 months ago (2014-10-17 00:50:05 UTC) #6
haraken
https://codereview.chromium.org/656073002/diff/1/Source/bindings/templates/methods.cpp File Source/bindings/templates/methods.cpp (right): https://codereview.chromium.org/656073002/diff/1/Source/bindings/templates/methods.cpp#newcode242 Source/bindings/templates/methods.cpp:242: {{method.cpp_type}} result = {{cpp_value}}; On 2014/10/17 00:50:05, bashi1 wrote: ...
6 years, 2 months ago (2014-10-17 00:57:12 UTC) #7
bashi
On 2014/10/17 00:57:12, haraken wrote: > https://codereview.chromium.org/656073002/diff/1/Source/bindings/templates/methods.cpp > File Source/bindings/templates/methods.cpp (right): > > https://codereview.chromium.org/656073002/diff/1/Source/bindings/templates/methods.cpp#newcode242 > ...
6 years, 2 months ago (2014-10-17 01:30:50 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/656073002/20001
6 years, 2 months ago (2014-10-17 01:31:51 UTC) #10
commit-bot: I haz the power
6 years, 2 months ago (2014-10-17 04:08:54 UTC) #11
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as 183855

Powered by Google App Engine
This is Rietveld 408576698