[Bug 26322] Definitions "algorithm" and "usages" properties of CryptoKey make no sense

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26322

--- Comment #5 from Mark Watson <watsonm@netflix.com> ---
(In reply to Boris Zbarsky from comment #4)
> > 1) Is there a concept of Frozen objects (maps) as well as of Frozen arrays ?
> 
> There's a concept of frozen objects.  Frozen means that you can't add or
> remove properties or change the values of existing properties.
> 
> It does NOT mean that accessors or methods cannot manipulate internal slots.
> So for example, given a frozen ES Date you could still setMonth() on it.
> 
> Also, please don't conflate "objects" and "maps".  An ES Map can be frozen,
> but since all mutation happens via methods operating on an internal slot
> that does nothing to prevent mutation of the Map.

Ok, so a frozen object, that was created by conversion from an IDL dictionary,
might do what we want, but a maplike interface would not. 

> 
> > 2) Is it important that the JS array / object is created when the attribute is
> first accessed, rather than when the thing implementing the interface that
> contains that attribute is created ?
> 
> Is the difference between the two observable?
> 
> If you rely on IDL to create the object for you, then it'll get created on
> access, because that's when IDL knows to do the dictionary-to-object or
> sequence-to-object conversion.  But afaict that's black-box identical to
> creating it sometime earlier, as long as the state the dictionary is based
> on is immutable.

Ok, I was under the impresssion, mistaken it seems, that construction of the JS
object could have observable side-effects, so it was important to define when
it happened. I see that at least if we're talking about an object created as a
result of WebIDL conversion from a dictionary, this is not the case, so it
makes no difference.

What about [ArrayClass] ? If we were to define our usages attribute to follow
the ImmutableItemList example in WebIDL does the process of creating the object
implementing that interface call the Array() constructor ?

> 
> > Another approach, I guess, would be to use the new maplike IDL,
> 
> Yes.
> 
> > is that if we use maplike there is no JS object for this thing
> 
> I have no idea what you mean there.  For which thing?

Hmmm, that my suggestion makes no sense tells me something. So I did some
reading. Ignore this one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Tuesday, 7 October 2014 02:05:30 UTC