11cb0ef41Sopenharmony_ci// Copyright 2015 the V8 project authors. All rights reserved. 21cb0ef41Sopenharmony_ci// Use of this source code is governed by a BSD-style license that can be 31cb0ef41Sopenharmony_ci// found in the LICENSE file. 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci#if !V8_ENABLE_WEBASSEMBLY 61cb0ef41Sopenharmony_ci#error This header should only be included if WebAssembly is enabled. 71cb0ef41Sopenharmony_ci#endif // !V8_ENABLE_WEBASSEMBLY 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci#ifndef V8_WASM_WASM_JS_H_ 101cb0ef41Sopenharmony_ci#define V8_WASM_WASM_JS_H_ 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ci#include "src/common/globals.h" 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_cinamespace v8 { 151cb0ef41Sopenharmony_cinamespace internal { 161cb0ef41Sopenharmony_ciclass Context; 171cb0ef41Sopenharmony_citemplate <typename T> 181cb0ef41Sopenharmony_ciclass Handle; 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_cinamespace wasm { 211cb0ef41Sopenharmony_ciclass StreamingDecoder; 221cb0ef41Sopenharmony_ci} // namespace wasm 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_ci// Exposes a WebAssembly API to JavaScript through the V8 API. 251cb0ef41Sopenharmony_ciclass WasmJs { 261cb0ef41Sopenharmony_ci public: 271cb0ef41Sopenharmony_ci V8_EXPORT_PRIVATE static void Install(Isolate* isolate, 281cb0ef41Sopenharmony_ci bool exposed_on_global_object); 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_ci V8_EXPORT_PRIVATE static void InstallConditionalFeatures( 311cb0ef41Sopenharmony_ci Isolate* isolate, Handle<Context> context); 321cb0ef41Sopenharmony_ci}; 331cb0ef41Sopenharmony_ci 341cb0ef41Sopenharmony_ci} // namespace internal 351cb0ef41Sopenharmony_ci} // namespace v8 361cb0ef41Sopenharmony_ci 371cb0ef41Sopenharmony_ci#endif // V8_WASM_WASM_JS_H_ 38