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

Issue 360463005: Add [TypeChecking=Interface] on various methods in Document.idl (Closed)

Created:
6 years, 5 months ago by Jens Widell
Modified:
6 years, 5 months ago
Reviewers:
haraken
CC:
blink-reviews, arv+blink, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, Inactive, watchdog-blink-watchlist_google.com, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Add [TypeChecking=Interface] on various methods in Document.idl This adds type checks on some Node arguments in the generated bindings code, and lets us drop the corresponding manual null checks and exception throwing code in the implementations. The type of exception thrown changes from DOMException (NOT_SUPPORTED_ERR) to TypeError as a side-effect. This matches the Web IDL specification. Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177125

Patch Set 1 #

Total comments: 4

Patch Set 2 : rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -50 lines) Patch
M LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html View 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/TreeWalker/TreeWalker-basic.html View 1 chunk +4 lines, -4 lines 0 comments Download
M LayoutTests/fast/dom/importNode-null-expected.txt View 1 chunk +1 line, -2 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 4 chunks +0 lines, -20 lines 0 comments Download
M Source/core/dom/Document.idl View 1 5 chunks +20 lines, -20 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
Jens Widell
PTAL I also experimented with adding [TypeChecking=Interface] on the whole interface, but decided not to ...
6 years, 5 months ago (2014-06-27 12:01:31 UTC) #1
sof
https://codereview.chromium.org/360463005/diff/1/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html File LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html (right): https://codereview.chromium.org/360463005/diff/1/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html#newcode44 LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html:44: assert_throws(new TypeError(), function () { document.createNodeIterator(null); }); It's consistent ...
6 years, 5 months ago (2014-06-27 12:11:08 UTC) #2
haraken
https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl File Source/core/dom/Document.idl (right): https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl#newcode74 Source/core/dom/Document.idl:74: [RaisesException, TypeChecking=Interface] NodeIterator createNodeIterator(Node root, Just help me understand: ...
6 years, 5 months ago (2014-06-27 12:39:33 UTC) #3
Jens Widell
https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl File Source/core/dom/Document.idl (right): https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl#newcode74 Source/core/dom/Document.idl:74: [RaisesException, TypeChecking=Interface] NodeIterator createNodeIterator(Node root, On 2014/06/27 12:39:33, haraken ...
6 years, 5 months ago (2014-06-27 12:53:31 UTC) #4
haraken
https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl File Source/core/dom/Document.idl (right): https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl#newcode74 Source/core/dom/Document.idl:74: [RaisesException, TypeChecking=Interface] NodeIterator createNodeIterator(Node root, On 2014/06/27 12:53:31, Jens ...
6 years, 5 months ago (2014-06-27 13:15:04 UTC) #5
Jens Widell
On 2014/06/27 13:15:04, haraken wrote: > https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl > File Source/core/dom/Document.idl (right): > > https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl#newcode74 > ...
6 years, 5 months ago (2014-06-27 13:18:14 UTC) #6
haraken
On 2014/06/27 13:18:14, Jens Lindström wrote: > On 2014/06/27 13:15:04, haraken wrote: > > https://codereview.chromium.org/360463005/diff/1/Source/core/dom/Document.idl ...
6 years, 5 months ago (2014-06-27 13:22:32 UTC) #7
Jens Widell
On 2014/06/27 13:22:32, haraken wrote: > On 2014/06/27 13:18:14, Jens Lindström wrote: > > On ...
6 years, 5 months ago (2014-06-27 13:25:53 UTC) #8
haraken
> > Why do we need [TypeChecking=Nullable] for removeStream(MediaStream? stream), > > but we don't ...
6 years, 5 months ago (2014-06-27 13:53:43 UTC) #9
Jens Widell
On 2014/06/27 13:53:43, haraken wrote: > > > Why do we need [TypeChecking=Nullable] for removeStream(MediaStream? ...
6 years, 5 months ago (2014-06-27 13:59:33 UTC) #10
haraken
On 2014/06/27 13:59:33, Jens Lindström wrote: > On 2014/06/27 13:53:43, haraken wrote: > > > ...
6 years, 5 months ago (2014-06-27 14:00:35 UTC) #11
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-06-27 14:11:01 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/360463005/1
6 years, 5 months ago (2014-06-27 14:11:39 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-06-27 15:17:07 UTC) #14
commit-bot: I haz the power
Failed to apply patch for Source/core/dom/Document.idl: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 5 months ago (2014-06-27 15:17:08 UTC) #15
Jens Widell
The CQ bit was checked by jl@opera.com
6 years, 5 months ago (2014-06-27 15:53:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jl@opera.com/360463005/20001
6 years, 5 months ago (2014-06-27 15:53:10 UTC) #17
Jens Widell
On 2014/06/27 12:11:08, sof wrote: > https://codereview.chromium.org/360463005/diff/1/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html > File LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html (right): > > https://codereview.chromium.org/360463005/diff/1/LayoutTests/fast/dom/NodeIterator/NodeIterator-basic.html#newcode44 > ...
6 years, 5 months ago (2014-06-27 15:59:04 UTC) #18
commit-bot: I haz the power
6 years, 5 months ago (2014-06-27 20:30:28 UTC) #19
Message was sent while issue was closed.
Change committed as 177125

Powered by Google App Engine
This is Rietveld 408576698