Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindings: Allow `any' dictionary members to be null. #9308

Merged
merged 1 commit into from Feb 1, 2018

Conversation

Projects
None yet
4 participants
@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented Jan 31, 2018

We had been using the same checks for both object and any Web IDL types to
determine if they were present, namely

!(member.IsEmpty() || member.IsNull() || member.IsUndefined())

However, both null' and undefined' are valid values for the any type, and
they should be considered distinct.

Add a separate check for any types without the "member.IsNull()" part of the
above one, so that one can pass null' to an any member and get it back instead of undefined'.

Bug: 803448
Change-Id: I90dce8f0fc6c0f4d4764d724501a58cf26e92526
Reviewed-on: https://chromium-review.googlesource.com/895304
Reviewed-by: Yuki Shiino yukishiino@chromium.org
Reviewed-by: Kentaro Hara haraken@chromium.org
Reviewed-by: Kenichi Ishibashi bashi@chromium.org
Reviewed-by: Hitoshi Yoshida peria@chromium.org
Commit-Queue: Raphael Kubo da Costa raphael.kubo.da.costa@intel.com
Cr-Commit-Position: refs/heads/master@{#533601}

@wpt-pr-bot
Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

@w3c-bots

This comment has been minimized.

Copy link

w3c-bots commented Jan 31, 2018

Build PASSED

Started: 2018-02-01 07:44:50
Finished: 2018-02-01 07:56:57

View more information about this build on:

bindings: Allow `any' dictionary members to be null.
We had been using the same checks for both object and any Web IDL types to
determine if they were present, namely

    !(member.IsEmpty() || member.IsNull() || member.IsUndefined())

However, both `null' and `undefined' are valid values for the any type, and
they should be considered distinct.

Add a separate check for any types without the "member.IsNull()" part of the
above one, so that one can pass `null' to an any member and get it back
instead of `undefined'.

Bug: 803448
Change-Id: I90dce8f0fc6c0f4d4764d724501a58cf26e92526
Reviewed-on: https://chromium-review.googlesource.com/895304
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Hitoshi Yoshida <peria@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#533601}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-895304 branch from 94e66a9 to b963c21 Feb 1, 2018

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 4c75634 into master Feb 1, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-895304 branch Feb 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.