wasm-js.h 946 Bytes
Newer Older
1 2 3 4
// Copyright 2015 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.

5 6 7 8
#if !V8_ENABLE_WEBASSEMBLY
#error This header should only be included if WebAssembly is enabled.
#endif  // !V8_ENABLE_WEBASSEMBLY

9 10
#ifndef V8_WASM_WASM_JS_H_
#define V8_WASM_WASM_JS_H_
11

12
#include "src/common/globals.h"
13 14 15

namespace v8 {
namespace internal {
16 17 18
class Context;
template <typename T>
class Handle;
19

20 21
namespace wasm {
class StreamingDecoder;
22
}  // namespace wasm
23

24
// Exposes a WebAssembly API to JavaScript through the V8 API.
25 26
class WasmJs {
 public:
27 28
  V8_EXPORT_PRIVATE static void Install(Isolate* isolate,
                                        bool exposed_on_global_object);
29 30 31

  V8_EXPORT_PRIVATE static void InstallConditionalFeatures(
      Isolate* isolate, Handle<Context> context);
32
};
33

34 35
}  // namespace internal
}  // namespace v8
36 37

#endif  // V8_WASM_WASM_JS_H_