Andrew Top | ef837fa | 2017-10-04 22:44:25 -0700 | [diff] [blame] | 1 | // Copyright 2016 the V8 project authors. All rights reserved. |
2 | // Use of this source code is governed by a BSD-style license that can be | ||||
3 | // found in the LICENSE file. | ||||
4 | |||||
5 | function GetWebAssembly() { | ||||
6 | return WebAssembly; | ||||
7 | } | ||||
8 | |||||
9 | let WASM_ON_BY_DEFAULT = true; | ||||
10 | |||||
11 | if (WASM_ON_BY_DEFAULT) { | ||||
12 | try { | ||||
13 | assertFalse(undefined === GetWebAssembly()); | ||||
14 | } catch (e) { | ||||
15 | assertTrue(false); | ||||
16 | } | ||||
17 | } else { | ||||
18 | assertThrows(GetWebAssembly); | ||||
19 | } |