@@ -157,33 +157,14 @@ policies and contribution forms [3].
157
157
var w = self ;
158
158
var i = 0 ;
159
159
var so ;
160
- var origins = location . ancestorOrigins ;
161
160
while ( w != w . parent ) {
162
161
w = w . parent ;
163
- // In WebKit, calls to parent windows' properties that aren't on the same
164
- // origin cause an error message to be displayed in the error console but
165
- // don't throw an exception. This is a deviation from the current HTML5
166
- // spec. See: https://bugs.webkit.org/show_bug.cgi?id=43504
167
- // The problem with WebKit's behavior is that it pollutes the error console
168
- // with error messages that can't be caught.
169
- //
170
- // This issue can be mitigated by relying on the (for now) proprietary
171
- // `location.ancestorOrigins` property which returns an ordered list of
172
- // the origins of enclosing windows. See:
173
- // http://trac.webkit.org/changeset/113945.
174
- if ( origins ) {
175
- so = ( location . origin == origins [ i ] ) ;
176
- } else {
177
- so = is_same_origin ( w ) ;
178
- }
162
+ so = is_same_origin ( w ) ;
179
163
cache . push ( [ w , so ] ) ;
180
164
i ++ ;
181
165
}
182
166
w = window . opener ;
183
167
if ( w ) {
184
- // window.opener isn't included in the `location.ancestorOrigins` prop.
185
- // We'll just have to deal with a simple check and an error msg on WebKit
186
- // browsers in this case.
187
168
cache . push ( [ w , is_same_origin ( w ) ] ) ;
188
169
}
189
170
this . window_cache = cache ;
@@ -1594,7 +1575,7 @@ policies and contribution forms [3].
1594
1575
* as another window or a worker. These events are then used to construct
1595
1576
* and maintain RemoteTest objects that mirror the tests running in the
1596
1577
* remote context.
1597
- *
1578
+ *
1598
1579
* An optional third parameter can be used as a predicate to filter incoming
1599
1580
* MessageEvents.
1600
1581
*/
0 commit comments