Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions lib/web/fetch/webidl.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,12 @@ webidl.converters.ArrayBuffer = function (V, opts = {}) {
// with the [AllowResizable] extended attribute, and
// IsResizableArrayBuffer(V) is true, then throw a
// TypeError.
// Note: resizable ArrayBuffers are currently a proposal.
if (V.resizable || V.growable) {
throw webidl.errors.exception({
header: 'ArrayBuffer',
message: 'Received a resizable ArrayBuffer.'
})
}

// 4. Return the IDL ArrayBuffer value that is a
// reference to the same object as V.
Expand Down Expand Up @@ -576,7 +581,12 @@ webidl.converters.TypedArray = function (V, T, opts = {}) {
// with the [AllowResizable] extended attribute, and
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
// true, then throw a TypeError.
// Note: resizable array buffers are currently a proposal
if (V.buffer.resizable || V.buffer.growable) {
throw webidl.errors.exception({
header: 'ArrayBuffer',
message: 'Received a resizable ArrayBuffer.'
})
}

// 5. Return the IDL value of type T that is a reference
// to the same object as V.
Expand Down Expand Up @@ -608,7 +618,12 @@ webidl.converters.DataView = function (V, opts = {}) {
// with the [AllowResizable] extended attribute, and
// IsResizableArrayBuffer(V.[[ViewedArrayBuffer]]) is
// true, then throw a TypeError.
// Note: resizable ArrayBuffers are currently a proposal
if (V.buffer.resizable || V.buffer.growable) {
throw webidl.errors.exception({
header: 'ArrayBuffer',
message: 'Received a resizable ArrayBuffer.'
})
}

// 4. Return the IDL DataView value that is a reference
// to the same object as V.
Expand Down