v8/test/mjsunit/wasm/wasm-default.js
titzer 9884fb91e1 [wasm] Enable WASM by default (--expose-wasm=true).
BUG=chromium:575167
R=rossberg@chromium.org,ahaas@chromium.org,clemensh@chromium.org,bradnelson@chromium.org

Review-Url: https://codereview.chromium.org/2623743003
Cr-Original-Original-Commit-Position: refs/heads/master@{#42197}
Committed: 34b63f050b
Review-Url: https://codereview.chromium.org/2623743003
Cr-Original-Commit-Position: refs/heads/master@{#42214}
Committed: 71f5650828
Review-Url: https://codereview.chromium.org/2623743003
Cr-Commit-Position: refs/heads/master@{#42267}
2017-01-12 12:04:35 +00:00

20 lines
422 B
JavaScript

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function GetWebAssembly() {
return WebAssembly;
}
let WASM_ON_BY_DEFAULT = true;
if (WASM_ON_BY_DEFAULT) {
try {
assertFalse(undefined === GetWebAssembly());
} catch (e) {
assertTrue(false);
}
} else {
assertThrows(GetWebAssembly);
}