summaryrefslogtreecommitdiff
path: root/ext/webidl/00_webidl.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/webidl/00_webidl.js')
-rw-r--r--ext/webidl/00_webidl.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index 4127d24bf..bb90d973e 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -77,6 +77,7 @@
Symbol,
SymbolIterator,
SymbolToStringTag,
+ TypedArrayPrototypeGetSymbolToStringTag,
TypeError,
Uint16Array,
Uint32Array,
@@ -442,6 +443,11 @@
return V;
}
+ function isDataView(V) {
+ return ArrayBufferIsView(V) &&
+ TypedArrayPrototypeGetSymbolToStringTag(V) === undefined;
+ }
+
function isNonSharedArrayBuffer(V) {
return ObjectPrototypeIsPrototypeOf(ArrayBufferPrototype, V);
}
@@ -467,7 +473,7 @@
};
converters.DataView = (V, opts = {}) => {
- if (!(ObjectPrototypeIsPrototypeOf(DataViewPrototype, V))) {
+ if (!isDataView(V)) {
throw makeException(TypeError, "is not a DataView", opts);
}