Debian Codegraph @

js/src/tests/test262-non262.js

raw
1 // This Source Code Form is subject to the terms of the Mozilla Public
2 // License, v. 2.0. If a copy of the MPL was not distributed with this
3 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5 // Test harness definitions from <https://github.com/tc39/test262/blob/main/harness/sm/non262.js>
6 // which aren't provided by our own test harness.
7
8 function createNewGlobal() {
9 return $262.createRealm().global
10 }
11
12 if (typeof createExternalArrayBuffer === "undefined") {
13 var createExternalArrayBuffer = size => new ArrayBuffer(size);
14 }
15
16 if (typeof enableGeckoProfilingWithSlowAssertions === "undefined") {
17 var enableGeckoProfilingWithSlowAssertions = () => {};
18 }
19
20 if (typeof enableGeckoProfiling === "undefined") {
21 var enableGeckoProfiling = () => {};
22 }
23
24 if (typeof disableGeckoProfiling === "undefined") {
25 var disableGeckoProfiling = () => {};
26 }