test262/harness/detachArrayBuffer.js
jugglinmike 330733eaf3 Correct licensing (#1608)
In order to satisfy the project's formatting rules, license information
was inserted into a number of files where it had been mistakenly omitted
by the original contributors [1]. In many cases, the license information
did not accurately describe the contributor or the time of contribution.
Update the information according to the information provided by the
contributors at the time each file was authored:

- atomicsHelper.js - a72ee6d91275aa6524e84a9b7070103411ef2689
- detachArrayBuffer.js - 70c7375be83137015da2c5d6d29a3c40ad3cb5b1
- nans.js - b17ffc029850e3c32d51c68e0281ab7b1a4c193b
- nativeFunctionMatcher.js - 6b7cbb50350e478a543da40d02492aa8f45a792d
- proxyTrapsHelper.js d530c87b41584d47d95bb78dccf592c9c5c8f7b1
- regexpUtils.js - 44b40e083ec851cd8448d5fe4755bdfc9f0dc14c
- tcoHelper.js - 4dc81d37886f49512eb60dafe13b794af5ffeb29

[1] 4ea2931f169d4a4b5a9a4a7c731cc92bf7b3e13c
2018-06-25 10:30:11 -04:00

17 lines
513 B
JavaScript

// Copyright (C) 2016 the V8 project authors. All rights reserved.
// 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.
---*/
function $DETACHBUFFER(buffer) {
if (!$262 || typeof $262.detachArrayBuffer !== "function") {
throw new Test262Error("No method available to detach an ArrayBuffer");
}
$262.detachArrayBuffer(buffer);
}