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

Issue 255553004: Split [StrictTypeChecking] into [TypeChecking=Interface|Nullable|String] (Closed)

Created:
6 years, 8 months ago by Nils Barth (inactive)
Modified:
6 years, 8 months ago
Reviewers:
haraken
CC:
blink-reviews, shans, gasubic, eae+blinkwatch, fs, eric.carlson_apple.com, nessy, adamk+blink_chromium.org, Steve Block, rwlbuis, chrishtr, dino_apple.com, arv+blink, alancutter (OOO until 2018), marja+watch_chromium.org, dglazkov+blink, abarth-chromium, aandrey+blink_chromium.org, dstockwell, Timothy Loh, Rik, pdr., ojan, Eric Willigers, philipj_slow, rjwright, sof, kouhei+svg_chromium.org, Raymond Toy, feature-media-reviews_chromium.org, tommyw+watchlist_chromium.org, krit, gyuyoung.kim_webkit.org, darktears, Nate Chapin, vcarbune.chromium, jsbell+bindings_chromium.org, kouhei+bindings_chromium.org, Mike Lawther (Google), ed+blinkwatch_opera.com, f(malita), Inactive, Stephen Chennney, watchdog-blink-watchlist_google.com
Visibility:
Public.

Description

Split [StrictTypeChecking] into [TypeChecking=Interface|Nullable|String] Prep for adding support for unrestricted double and float; no changes to generated bindings. In order to add proper type-checking to Blink code, we need to do this on an opt-in basis, to avoid breaking the web interface. There are lots of different type checking, so simplest is to put these as values for a single extended attribute, namely [StrictTypeChecking]. Currently there are three types of type checking: * Interface: if type is interface, does value implement interface? * Nullable: if value is null, is type nullable? * String: is a value stringable? I've split these as 'Interface', 'Nullable', and 'String'; for *almost* all existing [TypeChecking] these are all turned on, but now we can turn them on separately. Also: * Tests added Docs updated: http://www.chromium.org/blink/webidl/blink-idl-extended-attributes#TOC-TypeChecking-i-m-a-p- I'll follow up with: * [TypeChecking=Unrestricted] for floats and doubles, and then we can apply this to existing code, tearing out lots of boilerplate checks in Blink! R=haraken BUG=354298 BUG=321518 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=172485

Patch Set 1 #

Patch Set 2 : String too #

Patch Set 3 : Tests #

Patch Set 4 : Remove redundant flag #

Unified diffs Side-by-side diffs Delta from patch set Stats (+263 lines, -196 lines) Patch
M Source/bindings/IDLExtendedAttributes.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/scripts/v8_attributes.py View 1 5 chunks +14 lines, -9 lines 0 comments Download
M Source/bindings/scripts/v8_interface.py View 1 2 3 3 chunks +4 lines, -4 lines 0 comments Download
M Source/bindings/scripts/v8_methods.py View 1 3 chunks +9 lines, -4 lines 0 comments Download
M Source/bindings/templates/attributes.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/bindings/templates/interface.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/templates/methods.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/idls/TestInterface.idl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/idls/TestObject.idl View 1 2 4 chunks +10 lines, -8 lines 0 comments Download
M Source/bindings/tests/idls/TestSpecialOperations.idl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/V8TestObject.cpp View 1 2 10 chunks +105 lines, -50 lines 0 comments Download
M Source/core/animation/Timing.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/dom/Element.idl View 1 2 chunks +4 lines, -4 lines 0 comments Download
M Source/core/html/HTMLMediaElement.idl View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/html/HTMLOptionsCollection.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/HTMLSelectElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/ANGLEInstancedArrays.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/CanvasRenderingContext2D.idl View 1 5 chunks +40 lines, -40 lines 0 comments Download
M Source/core/html/canvas/DataView.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/OESVertexArrayObject.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/Path2D.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/WebGLDebugShaders.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/WebGLLoseContext.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/WebGLRenderingContext.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/canvas/WebGLRenderingContextBase.idl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/page/Selection.idl View 1 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/svg/SVGAngle.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGAnimatedBoolean.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGAnimatedEnumeration.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGAnimatedInteger.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGAnimatedNumber.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGFilterElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGGeometryElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGGraphicsElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGLength.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGLengthList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGMarkerElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGMatrix.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGNumber.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGNumberList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegArcAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegArcRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoCubicAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoCubicRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoCubicSmoothAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoCubicSmoothRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoQuadraticAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoQuadraticRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoQuadraticSmoothAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegCurvetoQuadraticSmoothRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoHorizontalAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoHorizontalRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoVerticalAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegLinetoVerticalRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegMovetoAbs.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPathSegMovetoRel.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPoint.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPointList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGPreserveAspectRatio.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGRect.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGSVGElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGStringList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGTextContentElement.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGTransform.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGTransformList.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/encryptedmedia/MediaKeySession.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/encryptedmedia/MediaKeys.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/imagebitmap/ImageBitmapFactories.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/imagebitmap/WindowImageBitmapFactories.idl View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/modules/mediastream/RTCPeerConnection.idl View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/modules/webaudio/AudioBufferSourceNode.idl View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 11 (0 generated)
Nils Barth (inactive)
Prep for unrestricted; WDYT?
6 years, 8 months ago (2014-04-24 07:03:55 UTC) #1
haraken
Just a clarifying question: - StrictTypeChecking=Interface|Nullable (<-- This is a common case) - StrictTypeChecking=Nullable (<-- ...
6 years, 8 months ago (2014-04-24 07:32:49 UTC) #2
Nils Barth (inactive)
On 2014/04/24 07:32:49, haraken wrote: > Just a clarifying question: > > - StrictTypeChecking=Interface|Nullable (<-- ...
6 years, 8 months ago (2014-04-24 07:54:12 UTC) #3
haraken
ok, LGTM.
6 years, 8 months ago (2014-04-24 07:56:19 UTC) #4
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 8 months ago (2014-04-24 08:51:23 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/255553004/60001
6 years, 8 months ago (2014-04-24 08:51:49 UTC) #6
Nils Barth (inactive)
On 2014/04/24 07:56:19, haraken wrote: > ok, LGTM. Thanks! Turns out there's 1 case of ...
6 years, 8 months ago (2014-04-24 08:53:08 UTC) #7
Nils Barth (inactive)
The CQ bit was unchecked by nbarth@chromium.org
6 years, 8 months ago (2014-04-24 08:53:20 UTC) #8
Nils Barth (inactive)
The CQ bit was checked by nbarth@chromium.org
6 years, 8 months ago (2014-04-24 09:01:19 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/255553004/60001
6 years, 8 months ago (2014-04-24 09:01:35 UTC) #10
commit-bot: I haz the power
6 years, 8 months ago (2014-04-24 11:15:48 UTC) #11
Message was sent while issue was closed.
Change committed as 172485

Powered by Google App Engine
This is Rietveld 408576698