W3C home > Mailing lists > Public > public-webcrypto@w3.org > July 2014

Re: Spec for CryptoKey.algorithm and CryptoKey.usages doesn't really make sense

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 14 Jul 2014 22:21:21 -0400
Message-ID: <53C49021.30102@mit.edu>
To: Ryan Sleevi <sleevi@google.com>
CC: Domenic Denicola <domenic@domenicdenicola.com>, public-webcrypto@w3.org
On 7/14/14, 9:40 PM, Ryan Sleevi wrote:
> I didn't think IDL allowed reference loops to happen.

If you have a property of type "object", then it might be any object. 
And structured cloning a random Object instance will structure clone its 
value properties, which might have value properties pointing back to 
that object itself.  The structured clone algorithm therefore has to 
deal with cycles in the graph being cloned.

If you happen to know that all your things are not actually random 
objects but rather something which will not have outgoing links to 
random objects when structured cloned, then you may not have this 
problem, of course.

>  > If your dictionaries can contain types like that, then you have to
> deal with that, sadly.  And I guess they do.  :(
>  >
> We wouldn't have any following normalization, which is always the first
> step, so it shouldn't.

OK.  What sort of members, _do_ you have?

Writing something here that works for a subset of IDL types is likely a 
lot simpler than handling them all.  ;)

> Shall we cross-check with TAG/script-coord, or defer that for upstreaming.

Letting people on script-coord know is probably a good idea, but I 
suspect that there is little that will be objectionable in clearly 
defining how to clone an IDL dictionary.

Received on Tuesday, 15 July 2014 02:21:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:02:51 UTC