xref: /third_party/node/deps/v8/src/wasm/wasm-js.h (revision 1cb0ef41)
1// Copyright 2015 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#if !V8_ENABLE_WEBASSEMBLY
6#error This header should only be included if WebAssembly is enabled.
7#endif  // !V8_ENABLE_WEBASSEMBLY
8
9#ifndef V8_WASM_WASM_JS_H_
10#define V8_WASM_WASM_JS_H_
11
12#include "src/common/globals.h"
13
14namespace v8 {
15namespace internal {
16class Context;
17template <typename T>
18class Handle;
19
20namespace wasm {
21class StreamingDecoder;
22}  // namespace wasm
23
24// Exposes a WebAssembly API to JavaScript through the V8 API.
25class WasmJs {
26 public:
27  V8_EXPORT_PRIVATE static void Install(Isolate* isolate,
28                                        bool exposed_on_global_object);
29
30  V8_EXPORT_PRIVATE static void InstallConditionalFeatures(
31      Isolate* isolate, Handle<Context> context);
32};
33
34}  // namespace internal
35}  // namespace v8
36
37#endif  // V8_WASM_WASM_JS_H_
38