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

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes

Created:
6 years, 6 months ago by Jens Widell
Modified:
6 years, 4 months ago
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, abarth-chromium
Base URL:
https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Project:
blink
Visibility:
Public.

Description

IDL: make optional arguments (without default) explicit sometimes If an optional argument without default is followed by at least one optional argument with a default, call the C++ implementation with a parameter of the type Optional<T> (T=the argument's C++ type) that contains a bool that represents whether the argument was missing, rather than calling the C++ implementation with fewer parameters. In the IDL code generator and templates, this is called an "explicit optional" argument. BUG=258153

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1018 lines, -944 lines) Patch
M LayoutTests/fast/canvas/canvas-isPointInPath-winding-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/canvas/canvas-path-context-clip-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-path-context-fill-expected.txt View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/canvas-scroll-path-into-view-expected.txt View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-path-context-clip.js View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-path-context-fill.js View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M LayoutTests/fast/canvas/script-tests/canvas-scroll-path-into-view.js View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M LayoutTests/fast/events/clipboard-clearData.html View 1 2 3 4 2 chunks +11 lines, -1 line 0 comments Download
M LayoutTests/fast/events/clipboard-clearData-expected.txt View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/IDLExtendedAttributes.txt View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
A Source/bindings/core/v8/Optional.h View 1 2 3 4 5 1 chunk +228 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/V8Binding.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M Source/bindings/core/v8/V8ScriptRunner.cpp View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/core/v8/custom/V8CanvasRenderingContext2DCustom.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 2 3 4 5 8 chunks +18 lines, -11 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 2 3 2 chunks +19 lines, -30 lines 0 comments Download
M Source/bindings/tests/idls/TestInterfaceConstructor.idl View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/idls/TestInterfaceConstructor2.idl View 1 2 3 2 chunks +2 lines, -6 lines 0 comments Download
M Source/bindings/tests/idls/TestInterfaceNamedConstructor.idl View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 2 3 4 5 6 2 chunks +3 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor.cpp View 1 2 3 4 5 5 chunks +31 lines, -36 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp View 1 2 3 4 5 2 chunks +23 lines, -14 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNamedConstructor.cpp View 1 2 3 4 5 2 chunks +28 lines, -19 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterfaceNode.cpp View 1 2 3 4 5 3 chunks +15 lines, -12 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 3 4 5 6 22 chunks +167 lines, -170 lines 0 comments Download
M Source/bindings/tests/results/V8TestTypedefs.cpp View 1 2 3 4 5 2 chunks +7 lines, -5 lines 0 comments Download
M Source/core/css/CSSKeyframesRule.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/css/CSSPrimitiveValue.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/css/CSSStyleDeclaration.idl View 1 2 2 chunks +7 lines, -7 lines 0 comments Download
M Source/core/css/CSSStyleSheet.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/css/CSSStyleSheet.cpp View 1 2 3 4 3 chunks +2 lines, -8 lines 0 comments Download
M Source/core/css/CSSStyleSheet.idl View 1 2 3 4 1 chunk +5 lines, -4 lines 0 comments Download
M Source/core/css/CSSSupportsRule.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/css/FontFaceSet.h View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M Source/core/css/FontFaceSet.cpp View 1 2 3 4 2 chunks +4 lines, -14 lines 0 comments Download
M Source/core/css/MediaQueryList.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/css/StyleMedia.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/css/WebKitCSSMatrix.idl View 1 2 1 chunk +17 lines, -17 lines 0 comments Download
M Source/core/dom/DOMImplementation.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/DOMStringList.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/DOMTokenList.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/dom/DOMTokenList.cpp View 1 2 3 4 1 chunk +11 lines, -18 lines 0 comments Download
M Source/core/dom/Document.idl View 1 2 3 4 5 chunks +30 lines, -30 lines 0 comments Download
M Source/core/dom/Element.idl View 1 2 2 chunks +6 lines, -6 lines 0 comments Download
M Source/core/dom/ElementFullscreen.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/NamedNodeMap.idl View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M Source/core/dom/Node.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/NodeFilter.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Range.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/dom/shadow/ShadowRoot.idl View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/editing/Selection.idl View 1 2 3 3 chunks +11 lines, -11 lines 0 comments Download
M Source/core/events/CompositionEvent.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/events/CustomEvent.idl View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/events/Event.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/events/HashChangeEvent.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/events/KeyboardEvent.idl View 1 2 1 chunk +10 lines, -10 lines 0 comments Download
M Source/core/events/MessageEvent.idl View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/events/MouseEvent.idl View 1 2 1 chunk +15 lines, -15 lines 0 comments Download
M Source/core/events/MutationEvent.idl View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/events/TextEvent.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/events/TouchEvent.idl View 1 2 1 chunk +13 lines, -13 lines 0 comments Download
M Source/core/events/UIEvent.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/core/fileapi/Blob.h View 1 2 3 4 2 chunks +2 lines, -15 lines 0 comments Download
M Source/core/fileapi/Blob.cpp View 1 2 3 4 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/fileapi/File.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/core/fileapi/File.cpp View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M Source/core/frame/ConsoleBase.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/History.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/frame/Window.idl View 1 2 3 chunks +15 lines, -15 lines 0 comments Download
M Source/core/frame/WindowTimers.idl View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/html/HTMLAllCollection.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLCanvasElement.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLCollection.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLImageElement.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLInputElement.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/html/HTMLInputElement.idl View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/html/HTMLMediaElement.idl View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLOptionElement.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLTableElement.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLTableElement.cpp View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTableElement.idl View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTableRowElement.h View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/html/HTMLTableRowElement.cpp View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M Source/core/html/HTMLTableRowElement.idl View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTableSectionElement.idl View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLTextAreaElement.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/ImageData.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/CanvasPathMethods.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.h View 1 2 3 4 4 chunks +6 lines, -15 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.cpp View 1 2 3 4 7 chunks +21 lines, -66 lines 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.idl View 1 2 3 4 3 chunks +9 lines, -9 lines 0 comments Download
M Source/core/html/canvas/OESVertexArrayObject.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/inspector/JavaScriptCallFrame.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/plugins/MimeTypeArray.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/plugins/Plugin.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/plugins/PluginArray.idl View 1 2 1 chunk +4 lines, -4 lines 0 comments Download
M Source/core/storage/StorageEvent.idl View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/xml/DOMParser.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/xml/DocumentXPathEvaluator.idl View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M Source/core/xml/XMLSerializer.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/xml/XPathEvaluator.idl View 1 2 1 chunk +8 lines, -8 lines 0 comments Download
M Source/core/xml/XPathExpression.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/xml/XPathNSResolver.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/xml/XPathResult.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/core/xml/XSLTProcessor.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/beacon/NavigatorBeacon.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/device_orientation/DeviceMotionEvent.idl View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M Source/modules/device_orientation/DeviceOrientationEvent.idl View 1 2 1 chunk +7 lines, -7 lines 0 comments Download
M Source/modules/filesystem/InspectorFileSystemAgent.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/gamepad/GamepadList.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/gamepad/WebKitGamepadList.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/indexeddb/IDBCursor.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/indexeddb/IDBCursor.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/indexeddb/IDBFactory.h View 1 2 3 4 3 chunks +2 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBFactory.cpp View 1 2 3 4 2 chunks +3 lines, -13 lines 0 comments Download
M Source/modules/indexeddb/IDBIndex.idl View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/indexeddb/IDBKeyRange.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.h View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.cpp View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M Source/modules/indexeddb/IDBObjectStore.idl View 1 2 1 chunk +5 lines, -5 lines 0 comments Download
M Source/modules/indexeddb/InspectorIndexedDBAgent.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/mediastream/RTCDTMFSender.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M Source/modules/mediastream/RTCDTMFSender.cpp View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M Source/modules/mediastream/RTCDTMFSender.idl View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/mediastream/RTCPeerConnection.idl View 1 2 2 chunks +5 lines, -5 lines 0 comments Download
M Source/modules/mediastream/RTCStatsResponse.idl View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/notifications/Notification.idl View 1 2 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/serviceworkers/Headers.h View 1 2 3 4 3 chunks +2 lines, -3 lines 0 comments Download
M Source/modules/serviceworkers/Headers.cpp View 1 2 3 4 2 chunks +10 lines, -20 lines 0 comments Download
M Source/modules/webaudio/AudioNode.idl View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download
M Source/modules/websockets/DOMWebSocket.h View 1 2 3 4 3 chunks +2 lines, -9 lines 0 comments Download
M Source/modules/websockets/DOMWebSocket.cpp View 1 2 3 4 3 chunks +4 lines, -19 lines 0 comments Download
M Source/modules/websockets/DOMWebSocketTest.cpp View 1 2 3 4 5 6 12 chunks +14 lines, -14 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Jens Widell
Please have a quick look at this. This is just a proof-of-concept (at this point) ...
6 years, 6 months ago (2014-06-17 09:53:37 UTC) #1
haraken
Commented in https://codereview.chromium.org/312683005/.
6 years, 6 months ago (2014-06-17 11:06:19 UTC) #2
Jens Widell
I've updated this patch to be more complicated. This is mostly a "what would it ...
6 years, 6 months ago (2014-06-23 15:32:16 UTC) #3
haraken
On 2014/06/23 15:32:16, Jens Lindström wrote: > I've updated this patch to be more complicated. ...
6 years, 6 months ago (2014-06-23 16:21:42 UTC) #4
Jens Widell
On 2014/06/23 16:21:42, haraken wrote: > On 2014/06/23 15:32:16, Jens Lindström wrote: > > I've ...
6 years, 6 months ago (2014-06-23 17:26:41 UTC) #5
Jens Widell
6 years, 6 months ago (2014-06-24 08:52:51 UTC) #6
On 2014/06/23 15:32:16, Jens Lindström wrote:
> I haven't examined its impact on performance or footprint. Could be neutral
(if
> all this templatery is optimized away) or completely unacceptable. :-)

With GCC the stripped binary's size shrinks by 10 kB or so, with this patch +
all uses of [Default=Undefined] in IDL files removed.

Powered by Google App Engine
This is Rietveld 408576698