Permalink
Browse files

Enumerate fewer cross-origin properties

In 205659f we made all properties on
cross-origin objects enumerable, equivalent to their same-origin object
counterparts.

However, this turned out not be web-compatible. This makes them
non-enumerable again with the exception of array index property names,
which need to be enumerable.

Tests: web-platform-tests/wpt#8045

Fixes #3183.
  • Loading branch information...
annevk authored and domenic committed Nov 6, 2017
1 parent 2757de3 commit ad8823782e7f6b7d60f8e216901bb76d1a53dd6d
Showing with 17 additions and 7 deletions.
  1. +17 −7 source
View
24 source
@@ -77841,7 +77841,7 @@ console.assert(iframeWindow.frameElement === null);
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: true,
[[Enumerable]]: false,
[[Writable]]: false,
[[Configurable]]: true }.</p></li>
</ol>
@@ -77868,7 +77868,7 @@ console.assert(iframeWindow.frameElement === null);
<li><p>Set <var>crossOriginDesc</var> to <span>PropertyDescriptor</span>{
[[Get]]: <var>crossOriginGet</var>,
[[Set]]: <var>crossOriginSet</var>,
[[Enumerable]]: true,
[[Enumerable]]: false,
[[Configurable]]: true }.</p></li>
</ol>
</li>
@@ -77894,6 +77894,10 @@ console.assert(iframeWindow.frameElement === null);
elsewhere in this specification for cases where we are not able to preserve these invariants, for
compatibility with existing Web content.) <ref spec=JAVASCRIPT></p>
<p class="note">The reason the property descriptors are non-enumerable, despite this mismatching
the same-origin behavior, is for compatibility with existing Web content. See <a
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
<h5><dfn>CrossOriginGet</dfn> ( <var>O</var>, <var>P</var>, <var>Receiver</var> )</h5>
<ol>
@@ -79076,11 +79080,17 @@ interface <dfn>BarProp</dfn> {
<li><p>Let <var>value</var> be the <code>WindowProxy</code> object of the
<span data-x="dom-window-nameditem-filter">named object</span> with the name <var>P</var>.
<li><p>Return <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: true,
[[Writable]]: false,
[[Configurable]]: true }.</p></li>
<li>
<p>Return <span>PropertyDescriptor</span>{
[[Value]]: <var>value</var>,
[[Enumerable]]: false,
[[Writable]]: false,
[[Configurable]]: true }.</p>
<p class="note">The reason the property descriptors are non-enumerable, despite this
mismatching the same-origin behavior, is for compatibility with existing Web content. See <a
href="https://github.com/whatwg/html/issues/3183">issue #3183</a> for details.</p>
</li>
</ol>
<li><p>Throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>

0 comments on commit ad88237

Please sign in to comment.