New issue
Advanced search Search tips

Issue 647234 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Treat null dictionary members as missing per WebIDL (impacts required members)

Project Member Reported by foolip@chromium.org, Sep 15 2016

Issue description

https://heycam.github.io/webidl/#es-dictionary

At step 5.1.2, both undefined and null are treated as missing, but in Blink's dictionary_v8.cpp, only undefined can lead to the TypeError being thrown. If null is passed, instead null will simply be passed along. This means that event constructor dictionaries with required members of interface type don't work as intended, and the resulting event instances will return null for nominally non-nullable attributes. Example:

new BlobEvent('foo', {data:null}).data (is null, should throw TypeError)
 

Comment 1 by foolip@chromium.org, Sep 15 2016

I'm trying something in https://codereview.chromium.org/2340883003 but it's not without risk. Will need to list all dictionaries that can start throwing TypeError where they did not before, and either do an Intent to Implement or at least an FYI to blink-dev.

Comment 2 by foolip@chromium.org, Sep 16 2016

Status: WontFix (was: Untriaged)
This was a misunderstanding on my part, WebIDL doesn't treat null as missing. Rather it's `foo(null)` that's treated like `foo({})` if foo's first argument is a dictionary.

Comment 3 by foolip@chromium.org, Sep 16 2016

 issue 647693  is the real problem

Sign in to add a comment