diff options
author | Kevin Gibbons <bakkot@gmail.com> | 2016-11-22 14:13:23 -0800 |
---|---|---|
committer | Leo Balter <leonardo.balter@gmail.com> | 2016-11-22 17:13:23 -0500 |
commit | abf6489b29ec2771b0969feaabab7899cceebc41 (patch) | |
tree | 18c03dd6a03684c7eca1228f00fcbb92ab8bc372 /harness | |
parent | 3ed2c78600757eee397ce9e13e5ca4cc92786507 (diff) | |
download | qtdeclarative-testsuites-abf6489b29ec2771b0969feaabab7899cceebc41.tar.gz |
use $.detachArrayBuffer API instead of throwing (#795)
Diffstat (limited to 'harness')
-rw-r--r-- | harness/detachArrayBuffer.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/harness/detachArrayBuffer.js b/harness/detachArrayBuffer.js index 52c9021ee..de8ac123d 100644 --- a/harness/detachArrayBuffer.js +++ b/harness/detachArrayBuffer.js @@ -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); } |