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