use $.detachArrayBuffer API instead of throwing (#795)

This commit is contained in:
Kevin Gibbons 2016-11-22 14:13:23 -08:00 committed by Leo Balter
parent 3ed2c78600
commit abf6489b29
1 changed files with 4 additions and 1 deletions

View File

@ -1,3 +1,6 @@
function $DETACHBUFFER(buffer) {
throw new Test262Error("No method available to detach an ArrayBuffer");
if (!$ || typeof $.detachArrayBuffer !== "function") {
throw new Test262Error("No method available to detach an ArrayBuffer");
}
$.detachArrayBuffer(buffer);
}