@@ -1147,7 +1147,7 @@ dictionary TextDecodeOptions {
1147
1147
interface TextDecoder {
1148
1148
constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {});
1149
1149
1150
- USVString decode(optional BufferSource input, optional TextDecodeOptions options = {});
1150
+ USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {});
1151
1151
};
1152
1152
TextDecoder includes TextDecoderCommon;
1153
1153
</pre>
@@ -1240,6 +1240,11 @@ method, when invoked, must run these steps:
1240
1240
avoids this copy. When doing so they will have to make sure that changes to <var> input</var> do
1241
1241
not affect future calls to <a method><code>decode()</code></a> .
1242
1242
1243
+ <p class=warning id=sharedarraybuffer-warning> The memory exposed by <code> SharedArrayBuffer</code>
1244
+ objects does not adhere to data race freedom properties required by the memory model of
1245
+ programming languages typically used for implementations. When implementing, take care to use the
1246
+ appropriate facilities when accessing memory exposed by <code> SharedArrayBuffer</code> objects.
1247
+
1243
1248
<li><p> Let <var> output</var> be a new <a for=/>stream</a> .
1244
1249
1245
1250
<li>
@@ -1303,7 +1308,7 @@ interface TextEncoder {
1303
1308
constructor();
1304
1309
1305
1310
[NewObject] Uint8Array encode(optional USVString input = "");
1306
- TextEncoderEncodeIntoResult encodeInto(USVString source, Uint8Array destination);
1311
+ TextEncoderEncodeIntoResult encodeInto(USVString source, [AllowShared] Uint8Array destination);
1307
1312
};
1308
1313
TextEncoder includes TextEncoderCommon;
1309
1314
</pre>
@@ -1409,8 +1414,13 @@ method, when invoked, must run these steps:
1409
1414
1410
1415
<li><p> Otherwise, increment <var> read</var> by 1.
1411
1416
1412
- <li><p> Write the bytes in <var> result</var> into <var> destinationBytes</var> , from byte
1413
- offset <var> written</var> .
1417
+ <li>
1418
+ <p> Write the bytes in <var> result</var> into <var> destinationBytes</var> , from byte offset
1419
+ <var> written</var> .
1420
+
1421
+ <p class=warning> See the
1422
+ <a href=#sharedarraybuffer-warning>warning for <code>SharedArrayBuffer</code> objects</a>
1423
+ above.
1414
1424
1415
1425
<li><p> Increment <var> written</var> by the number of bytes in <var> result</var> .
1416
1426
</ol>
@@ -1518,9 +1528,10 @@ TextDecoderStream includes GenericTransformStream;
1518
1528
1519
1529
<dt><code><var> decoder</var> . <a attribute for=GenericTransformStream>writable</a> </code>
1520
1530
<dd>
1521
- <p> Returns a <a>writable stream</a> which accepts {{BufferSource}} chunks and runs them through
1522
- <a for=TextDecoderCommon>encoding</a> 's <a for=/>decoder</a> before making them available to
1523
- {{GenericTransformStream/readable}} .
1531
+ <p> Returns a <a>writable stream</a> which accepts
1532
+ <code> [<a extended-attribute>AllowShared</a>] <a typedef>BufferSource</a> </code> chunks and runs
1533
+ them through <a for=TextDecoderCommon>encoding</a> 's <a for=/>decoder</a> before making them
1534
+ available to {{GenericTransformStream/readable}} .
1524
1535
1525
1536
<p> Typically this will be used via the {{ReadableStream/pipeThrough()}} method on a
1526
1537
{{ReadableStream}} source.
@@ -1584,12 +1595,17 @@ byteReadable
1584
1595
1585
1596
<ol>
1586
1597
<li><p> Let <var> bufferSource</var> be the result of
1587
- <a lt="converted to an IDL value">converting</a> <var> chunk</var> to a {{BufferSource}} . If this
1588
- throws an exception, then return a promise rejected with that exception.
1598
+ <a lt="converted to an IDL value">converting</a> <var> chunk</var> to an
1599
+ <code> [<a extended-attribute>AllowShared</a>] <a typedef>BufferSource</a> </code> . If this throws an
1600
+ exception, then return a promise rejected with that exception.
1601
+
1602
+ <li>
1603
+ <p> <a>Push</a> a <a lt="get a copy of the buffer source">copy of</a> <var> bufferSource</var> to
1604
+ <var> dec</var> 's <a for=TextDecoderStream>stream</a> . If this throws an exception, then return a
1605
+ promise rejected with that exception.
1589
1606
1590
- <li><p> <a>Push</a> a <a lt="get a copy of the buffer source">copy of</a> <var> bufferSource</var> to
1591
- <var> dec</var> 's <a for=TextDecoderStream>stream</a> . If this throws an exception, then return a
1592
- promise rejected with that exception.
1607
+ <p class=warning> See the
1608
+ <a href=#sharedarraybuffer-warning>warning for <code>SharedArrayBuffer</code> objects</a> above.
1593
1609
1594
1610
<li><p> Let <var> controller</var> be <var> dec</var> 's
1595
1611
<a for=GenericTransformStream>transform</a> .\[[transformStreamController]] .
@@ -3266,6 +3282,7 @@ Aneesh Agrawal,
3266
3282
Arkadiusz Michalski,
3267
3283
Asmus Freytag,
3268
3284
Ben Noordhuis,
3285
+ Bnaya Peretz,
3269
3286
Boris Zbarsky,
3270
3287
Bruno Haible,
3271
3288
Cameron McCormack,
0 commit comments