New issue
Advanced search Search tips

Issue 709833 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

bindings: nullable attribute setters should treat null as null

Project Member Reported by bashi@chromium.org, Apr 10 2017

Issue description

Currently attribute setters use NativeValueTraits::nativeValue<T> for IDL value T?. This is wrong because nativeValue<T> converts null to something (e.g. nativeValue<bool> returns false when null is passed).
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b4de20aaeabfe3d6476d9d431992079c9d09486a

commit b4de20aaeabfe3d6476d9d431992079c9d09486a
Author: bashi <bashi@chromium.org>
Date: Mon Apr 10 03:09:28 2017

bindings: Pass is_null flag to attribute setters when they are nullable

Some types can express null by itself (e.g. pointers) but some others
are not (e.g. bool). Ideally we should wrap these types with Nullable<T>
to make it nullable. However, changing to use Nullable<T> requires a lot
of changes in the binding layer. As a workaround, use a flag to indicate
it is null or not.

BUG= 709833 

Review-Url: https://codereview.chromium.org/2809543002
Cr-Commit-Position: refs/heads/master@{#463169}

[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/Animation.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/Animation.h
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/AnimationTest.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/AnimationTimeline.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/AnimationTimeline.h
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/AnimationTimelineTest.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/EffectStackTest.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/html/HTMLInputElement.h
[modify] https://crrev.com/b4de20aaeabfe3d6476d9d431992079c9d09486a/third_party/WebKit/Source/core/inspector/InspectorAnimationAgent.cpp

Comment 2 by bashi@chromium.org, Apr 10 2017

Status: Fixed (was: Assigned)

Sign in to add a comment