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

Issue 85263002: Improve handling of dictionary conversions. (Closed)

Created:
7 years ago by sof
Modified:
7 years ago
CC:
blink-reviews, Nils Barth (inactive), nessy, arv+blink, jsbell+bindings_chromium.org, Nate Chapin, marja+watch_chromium.org, philipj_slow, gasubic, tommyw+watchlist_chromium.org, watchdog-blink-watchlist_google.com, feature-media-reviews_chromium.org, dglazkov+blink, adamk+blink_chromium.org, kojih, abarth-chromium, vcarbune.chromium, Inactive
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Improve handling of dictionary conversions. When generating bindings for the dictionaries that Event constructors take, emit code that enforce the required conversion step as per WebIDL. i.e., if the property fails to convert, emit the required (TypeError) exception and fail. Previously these were mapped to empty/zero/null instead. R= BUG=323036 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162859

Patch Set 1 #

Total comments: 9

Patch Set 2 : Have conversion methods take a context argument; elaborate error msgs further. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+949 lines, -390 lines) Patch
M LayoutTests/fast/events/constructors/composition-event-constructor.html View 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/composition-event-constructor-expected.txt View 1 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/focus-event-constructor.html View 2 chunks +23 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/constructors/focus-event-constructor-expected.txt View 1 1 chunk +23 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/constructors/keyboard-event-constructor.html View 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/keyboard-event-constructor-expected.txt View 1 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/media-key-event-constructor.html View 6 chunks +25 lines, -24 lines 0 comments Download
M LayoutTests/fast/events/constructors/media-key-event-constructor-expected.txt View 1 4 chunks +23 lines, -23 lines 0 comments Download
M LayoutTests/fast/events/constructors/media-stream-event-constructor.html View 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/media-stream-event-constructor-expected.txt View 1 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/message-event-constructor.html View 1 chunk +13 lines, -12 lines 0 comments Download
M LayoutTests/fast/events/constructors/message-event-constructor-expected.txt View 1 1 chunk +13 lines, -12 lines 0 comments Download
M LayoutTests/fast/events/constructors/mouse-event-constructor.html View 2 chunks +23 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/constructors/mouse-event-constructor-expected.txt View 1 2 chunks +23 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/constructors/storage-event-constructor.html View 1 chunk +13 lines, -12 lines 0 comments Download
M LayoutTests/fast/events/constructors/storage-event-constructor-expected.txt View 1 1 chunk +13 lines, -12 lines 0 comments Download
M LayoutTests/fast/events/constructors/track-event-constructor.html View 1 chunk +9 lines, -9 lines 0 comments Download
M LayoutTests/fast/events/constructors/track-event-constructor-expected.txt View 1 1 chunk +9 lines, -9 lines 0 comments Download
M LayoutTests/fast/events/constructors/ui-event-constructor.html View 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/ui-event-constructor-expected.txt View 1 1 chunk +12 lines, -11 lines 0 comments Download
M LayoutTests/fast/events/constructors/wheel-event-constructor.html View 2 chunks +23 lines, -21 lines 0 comments Download
M LayoutTests/fast/events/constructors/wheel-event-constructor-expected.txt View 1 2 chunks +23 lines, -21 lines 0 comments Download
M LayoutTests/media/track/opera/interfaces/TrackEvent/constructor.html View 1 chunk +10 lines, -4 lines 0 comments Download
M LayoutTests/media/track/opera/interfaces/TrackEvent/constructor-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/code_generator_v8.pm View 1 8 chunks +78 lines, -9 lines 0 comments Download
M Source/bindings/tests/results/V8TestEventConstructor.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestEventConstructor.cpp View 1 2 chunks +8 lines, -4 lines 0 comments Download
M Source/bindings/tests/results/V8TestExtendedEvent.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestExtendedEvent.cpp View 1 2 chunks +15 lines, -7 lines 0 comments Download
M Source/bindings/v8/Dictionary.h View 1 3 chunks +217 lines, -0 lines 1 comment Download
M Source/bindings/v8/Dictionary.cpp View 1 14 chunks +197 lines, -7 lines 0 comments Download
M Source/bindings/v8/ExceptionMessages.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/v8/ExceptionMessages.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/v8/V8Binding.h View 3 chunks +1 line, -10 lines 0 comments Download
M Source/bindings/v8/V8Binding.cpp View 7 chunks +29 lines, -6 lines 0 comments Download
M Source/core/events/FocusEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/events/FocusEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/events/MessageEvent.h View 2 chunks +2 lines, -4 lines 0 comments Download
M Source/core/events/MessageEvent.cpp View 1 2 chunks +10 lines, -0 lines 0 comments Download
M Source/core/events/MessageEvent.idl View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/events/MouseEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/events/MouseEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/events/UIEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/events/UIEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/MediaKeyEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/MediaKeyEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/storage/StorageEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/storage/StorageEvent.idl View 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/mediastream/MediaStreamEvent.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamEvent.cpp View 1 chunk +6 lines, -0 lines 0 comments Download
M Source/modules/mediastream/MediaStreamEvent.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (0 generated)
sof
At your own leisure, please have a look. (If there are others even better placed ...
7 years ago (2013-11-25 07:10:42 UTC) #1
haraken
What's the behavior of other browsers?
7 years ago (2013-11-25 07:31:05 UTC) #2
sof
On 2013/11/25 07:31:05, haraken wrote: > What's the behavior of other browsers? e.g. `new UIEvent("ev", ...
7 years ago (2013-11-25 07:37:02 UTC) #3
sof
https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.h File Source/bindings/v8/Dictionary.h (right): https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.h#newcode102 Source/bindings/v8/Dictionary.h:102: bool convert(const String&, bool&, ExceptionState&) const; An alternate design ...
7 years ago (2013-11-25 08:21:32 UTC) #4
Mike West
Looks pretty reasonable, though larger than I'd have expected. Also, I hate perl. :) A ...
7 years ago (2013-11-25 08:22:48 UTC) #5
sof
https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.cpp File Source/bindings/v8/Dictionary.cpp (right): https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.cpp#newcode191 Source/bindings/v8/Dictionary.cpp:191: exceptionState.throwTypeError(ExceptionMessages::illTypedProperty(key, "is not of type 'double'.")); On 2013/11/25 08:22:48, ...
7 years ago (2013-11-25 11:57:22 UTC) #6
sof
https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.cpp File Source/bindings/v8/Dictionary.cpp (right): https://codereview.chromium.org/85263002/diff/1/Source/bindings/v8/Dictionary.cpp#newcode191 Source/bindings/v8/Dictionary.cpp:191: exceptionState.throwTypeError(ExceptionMessages::illTypedProperty(key, "is not of type 'double'.")); On 2013/11/25 11:57:23, ...
7 years ago (2013-11-25 23:24:04 UTC) #7
sof
https://codereview.chromium.org/85263002/diff/120001/Source/bindings/v8/Dictionary.h File Source/bindings/v8/Dictionary.h (right): https://codereview.chromium.org/85263002/diff/120001/Source/bindings/v8/Dictionary.h#newcode105 Source/bindings/v8/Dictionary.h:105: : m_interfaceName(interfaceName) I notice https://codereview.chromium.org/87963002, has part of this ...
7 years ago (2013-11-27 23:46:42 UTC) #8
Mike West
On 2013/11/27 23:46:42, sof wrote: > https://codereview.chromium.org/85263002/diff/120001/Source/bindings/v8/Dictionary.h > File Source/bindings/v8/Dictionary.h (right): > > https://codereview.chromium.org/85263002/diff/120001/Source/bindings/v8/Dictionary.h#newcode105 > ...
7 years ago (2013-11-28 08:21:39 UTC) #9
Mike West
Sorry, I thought this already went though! LGTM. Land it. :)
7 years ago (2013-11-28 09:58:22 UTC) #10
sof
On 2013/11/28 08:21:39, Mike West wrote: > On 2013/11/27 23:46:42, sof wrote: > > > ...
7 years ago (2013-11-28 10:27:53 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/85263002/120001
7 years ago (2013-11-28 10:28:30 UTC) #12
commit-bot: I haz the power
Retried try job too often on blink_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=blink_presubmit&number=11995
7 years ago (2013-11-28 10:46:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/85263002/120001
7 years ago (2013-11-28 11:13:54 UTC) #14
sof
@tommyw: when you have a moment, are the modules/mediastream/ changes acceptable?
7 years ago (2013-11-28 11:14:53 UTC) #15
commit-bot: I haz the power
Retried try job too often on blink_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=blink_presubmit&number=11998
7 years ago (2013-11-28 11:31:45 UTC) #16
Tommy Widenflycht
lgtm
7 years ago (2013-11-28 12:08:51 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/85263002/120001
7 years ago (2013-11-28 14:41:20 UTC) #18
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=4223
7 years ago (2013-11-28 15:49:48 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/85263002/120001
7 years ago (2013-11-28 15:51:30 UTC) #20
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=4237
7 years ago (2013-11-28 16:53:21 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/85263002/120001
7 years ago (2013-11-28 21:39:36 UTC) #22
commit-bot: I haz the power
7 years ago (2013-11-28 23:39:23 UTC) #23
Message was sent while issue was closed.
Change committed as 162859

Powered by Google App Engine
This is Rietveld 408576698