Re: undefined values in dictionaries

On 6/24/13 5:07 AM, Anne van Kesteren wrote:
> On Tue, Jun 18, 2013 at 9:36 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>> What Gecko's code for this looks like is more like this (after making a
>> change to align with the intent of the spec here):
>>
>>    If Type(V) is Null or Undefined set value to Undefined.  Otherwise let
>>      value be the result of calling the [[Get]] internal method on V
>>      with property name key.
>>    Let present be false if Type(value) is Undefined and true otherwise.
>
> I thought we wanted Null and Undefined to be treated as distinct? E.g.
> for nullable? I'd expect undefined to be treated as not passed and
> null as null.

In this case "V" is the thing passed as a dictionary.  I believe for a 
dictionary, we did in fact want "not passed", undefined, null, and {} to 
be treated identically.

-Boris

Received on Monday, 24 June 2013 13:46:38 UTC