2018-06-25 16:30:11 +02:00
|
|
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
|
2017-07-14 17:37:24 +02:00
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
/*---
|
|
|
|
description: |
|
|
|
|
A function used in the process of asserting correctness of TypedArray objects.
|
|
|
|
|
|
|
|
$262.detachArrayBuffer is defined by a host.
|
2019-09-25 02:22:26 +02:00
|
|
|
defines: [$DETACHBUFFER]
|
2017-07-14 17:37:24 +02:00
|
|
|
---*/
|
|
|
|
|
2016-03-17 22:16:38 +01:00
|
|
|
function $DETACHBUFFER(buffer) {
|
2017-03-01 22:34:15 +01:00
|
|
|
if (!$262 || typeof $262.detachArrayBuffer !== "function") {
|
2016-11-22 23:13:23 +01:00
|
|
|
throw new Test262Error("No method available to detach an ArrayBuffer");
|
|
|
|
}
|
2017-03-01 22:34:15 +01:00
|
|
|
$262.detachArrayBuffer(buffer);
|
2016-03-17 22:16:38 +01:00
|
|
|
}
|