1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibWasm/AbstractMachine/Interpreter.h
Ali Mohammad Pur 51bab5b186 LibWasm: Make traps hold on to externally-managed data
...instead of specially handling JS::Completion.
This makes it possible for LibWeb/LibJS to have full control over how
these things are made, stored, and visited (whenever).

Fixes an issue where we couldn't roundtrip a JS exception through Wasm.
2025-04-22 08:43:46 -06:00

22 lines
489 B
C++

/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWasm/AbstractMachine/Configuration.h>
namespace Wasm {
struct Interpreter {
virtual ~Interpreter() = default;
virtual void interpret(Configuration&) = 0;
virtual Trap trap() const = 0;
virtual bool did_trap() const = 0;
virtual void clear_trap() = 0;
virtual void visit_external_resources(HostVisitOps const&) { }
};
}