v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
runtime-utils.cc
Go to the documentation of this file.
1// Copyright 2024 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
6
7#if V8_ENABLE_WEBASSEMBLY
8#include "src/base/logging.h"
11#endif // V8_ENABLE_WEBASSEMBLY
12
13namespace v8::internal {
14
15#if V8_ENABLE_WEBASSEMBLY
17 : isolate_(isolate) {
19 if (trap_handler::IsTrapHandlerEnabled() && trap_handler::IsThreadInWasm()) {
20 thread_was_in_wasm_ = true;
21 trap_handler::ClearThreadInWasm();
22 }
23}
24
25SaveAndClearThreadInWasmFlag::~SaveAndClearThreadInWasmFlag() {
26 if (thread_was_in_wasm_ && !isolate_->has_exception()) {
27 trap_handler::SetThreadInWasm();
28 }
29}
30#endif
31
32} // namespace v8::internal
Isolate * isolate_
#define DCHECK(condition)
Definition logging.h:482