Skip to content

Commit 03e416d

Browse files
committed
Bug 1414292. Update to HTML spec changes for cross-origin object property enumerability. r=peterv
Updates to whatwg/html#3186 Includes the changes from web-platform-tests/wpt#8045 MozReview-Commit-ID: 5vEo1QGPufE UltraBlame original commit: 2a5a80d284b5ef958298cf515867ffbe420478c0
1 parent bc97031 commit 03e416d

File tree

3 files changed

+65
-116
lines changed

3 files changed

+65
-116
lines changed

js/xpconnect/wrappers/FilteringWrapper.cpp

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,24 +1505,40 @@ origin
15051505
DOM
15061506
objects
15071507
are
1508-
non
1509-
-
1510-
enumerable
1511-
and
1512-
/
1513-
/
15141508
"
15151509
configurable
15161510
"
15171511
.
15181512
Any
1513+
/
1514+
/
15191515
value
15201516
attributes
15211517
are
15221518
read
15231519
-
15241520
only
15251521
.
1522+
Indexed
1523+
properties
1524+
are
1525+
enumerable
1526+
/
1527+
/
1528+
but
1529+
nothing
1530+
else
1531+
is
1532+
.
1533+
if
1534+
(
1535+
!
1536+
JSID_IS_INT
1537+
(
1538+
id
1539+
)
1540+
)
1541+
{
15261542
desc
15271543
.
15281544
attributesRef
@@ -1533,6 +1549,7 @@ attributesRef
15331549
~
15341550
JSPROP_ENUMERATE
15351551
;
1552+
}
15361553
desc
15371554
.
15381555
attributesRef

testing/web-platform/meta/html/browsers/origin/cross-origin-objects/cross-origin-objects.html.ini

Lines changed: 0 additions & 68 deletions
This file was deleted.

testing/web-platform/tests/html/browsers/origin/cross-origin-objects/cross-origin-objects.html

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2143,19 +2143,35 @@
21432143
expectWritable
21442144
)
21452145
{
2146-
var
2146+
const
21472147
isSymbol
21482148
=
2149-
(
21502149
typeof
21512150
(
21522151
propName
21532152
)
21542153
=
21552154
=
2155+
=
21562156
"
21572157
symbol
21582158
"
2159+
;
2160+
const
2161+
isArrayIndexPropertyName
2162+
=
2163+
!
2164+
isSymbol
2165+
&
2166+
&
2167+
!
2168+
isNaN
2169+
(
2170+
parseInt
2171+
(
2172+
propName
2173+
10
2174+
)
21592175
)
21602176
;
21612177
propName
@@ -2208,7 +2224,8 @@
22082224
;
22092225
if
22102226
(
2211-
isSymbol
2227+
!
2228+
isArrayIndexPropertyName
22122229
)
22132230
{
22142231
assert_equals
@@ -2218,8 +2235,6 @@
22182235
enumerable
22192236
false
22202237
"
2221-
symbol
2222-
-
22232238
property
22242239
descriptor
22252240
for
@@ -2235,6 +2250,11 @@
22352250
"
22362251
)
22372252
;
2253+
if
2254+
(
2255+
isSymbol
2256+
)
2257+
{
22382258
assert_true
22392259
(
22402260
"
@@ -2288,6 +2308,7 @@
22882308
)
22892309
;
22902310
}
2311+
}
22912312
else
22922313
{
22932314
assert_equals
@@ -3161,7 +3182,7 @@
31613182
;
31623183
assert_true
31633184
(
3164-
whitelistedWindowPropNames
3185+
whitelistedWindowIndices
31653186
.
31663187
includes
31673188
(
@@ -3186,12 +3207,13 @@
31863207
assert_equals
31873208
(
31883209
i
3189-
whitelistedWindowPropNames
3210+
whitelistedWindowIndices
31903211
.
31913212
length
31923213
"
31933214
Enumerate
31943215
all
3216+
enumerable
31953217
safelisted
31963218
cross
31973219
-
@@ -3219,40 +3241,19 @@
32193241
+
32203242
+
32213243
;
3222-
assert_true
3223-
(
3224-
whitelistedLocationPropNames
3225-
.
3226-
includes
3227-
(
3228-
prop
3229-
)
3230-
prop
3231-
+
3232-
"
3233-
is
3234-
not
3235-
safelisted
3236-
for
3237-
a
3238-
cross
3239-
-
3240-
origin
3241-
Location
3242-
"
3243-
)
3244-
;
32453244
}
32463245
assert_equals
32473246
(
32483247
i
3249-
whitelistedLocationPropNames
3250-
.
3251-
length
3248+
0
32523249
"
3253-
Enumerate
3254-
all
3255-
safelisted
3250+
There
3251+
'
3252+
s
3253+
nothing
3254+
to
3255+
enumerate
3256+
for
32563257
cross
32573258
-
32583259
origin
@@ -3267,6 +3268,7 @@
32673268
only
32683269
enumerate
32693270
safelisted
3271+
enumerable
32703272
properties
32713273
"
32723274
)
@@ -3330,7 +3332,7 @@
33303332
sort
33313333
(
33323334
)
3333-
whitelistedWindowPropNames
3335+
whitelistedWindowIndices
33343336
"
33353337
Object
33363338
.
@@ -3382,7 +3384,7 @@
33823384
"
33833385
)
33843386
;
3385-
assert_array_equals
3387+
assert_equals
33863388
(
33873389
Object
33883390
.
@@ -3393,10 +3395,8 @@
33933395
location
33943396
)
33953397
.
3396-
sort
3397-
(
3398-
)
3399-
whitelistedLocationPropNames
3398+
length
3399+
0
34003400
"
34013401
Object
34023402
.

0 commit comments

Comments
 (0)