[Bug 21555] Use of IDL arrays for keyPath values is underdefined

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

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> ---
> it seems that the Gecko behavior could be described by altering the prose
> to say

Given the IDL, there is no way to describe the Gecko behavior.  Again, because
IDL arrays are not actual JS Array objects.

For example, consider this snippet, assuming store.keyPath is an array:

  var keyPath = store.keyPath;
  keyPath[5] = { toString: { alert('gotcha'); return "xyz"; } };

In Gecko, there is no alert and keyPath[5] is an object.  For a variable-length
WebIDL array, there will be an alert and keyPath[5] will be the string "xyz".

Unfortunately, IDL does not have a way to actually return the same exact actual
Array object each time, short of returning "any" and then defining it all in
prose or something.  That's why I cced Cameron on this bug...

One other note: if Chrome is switched to the Gecko behavior, how well would it
handle this:

  store.keyPath.amIGoingToLeak = store;

?  Gecko handles that via the cycle collector, but I was given to understand
that WebKit doesn't have such a thing....

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Tuesday, 2 April 2013 18:53:26 UTC