• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
14 namespace v8 {
15 namespace internal {
16 class Context;
17 template <typename T>
18 class Handle;
19 
20 namespace wasm {
21 class StreamingDecoder;
22 }  // namespace wasm
23 
24 // Exposes a WebAssembly API to JavaScript through the V8 API.
25 class 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