@@ -536,7 +536,12 @@ webidl.converters.ArrayBuffer = function (V, opts = {}) {
536
536
// with the [AllowResizable] extended attribute, and
537
537
// IsResizableArrayBuffer(V) is true, then throw a
538
538
// TypeError.
539
- // Note: resizable ArrayBuffers are currently a proposal.
539
+ if ( V . resizable || V . growable ) {
540
+ throw webidl . errors . exception ( {
541
+ header : 'ArrayBuffer' ,
542
+ message : 'Received a resizable ArrayBuffer.'
543
+ } )
544
+ }
540
545
541
546
// 4. Return the IDL ArrayBuffer value that is a
542
547
// reference to the same object as V.
@@ -576,7 +581,12 @@ webidl.converters.TypedArray = function (V, T, opts = {}) {
576
581
// with the [AllowResizable] extended attribute, and
577
582
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
578
583
// true, then throw a TypeError.
579
- // Note: resizable array buffers are currently a proposal
584
+ if ( V . buffer . resizable || V . buffer . growable ) {
585
+ throw webidl . errors . exception ( {
586
+ header : 'ArrayBuffer' ,
587
+ message : 'Received a resizable ArrayBuffer.'
588
+ } )
589
+ }
580
590
581
591
// 5. Return the IDL value of type T that is a reference
582
592
// to the same object as V.
@@ -608,7 +618,12 @@ webidl.converters.DataView = function (V, opts = {}) {
608
618
// with the [AllowResizable] extended attribute, and
609
619
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
610
620
// true, then throw a TypeError.
611
- // Note: resizable ArrayBuffers are currently a proposal
621
+ if ( V . buffer . resizable || V . buffer . growable ) {
622
+ throw webidl . errors . exception ( {
623
+ header : 'ArrayBuffer' ,
624
+ message : 'Received a resizable ArrayBuffer.'
625
+ } )
626
+ }
612
627
613
628
// 4. Return the IDL DataView value that is a reference
614
629
// to the same object as V.
0 commit comments