// wasm::Realm lives in JS::Realm and contains the wasm-related per-realm state. // wasm::Realm tracks every live instance in the realm and must be notified, via // registerInstance(), of any new WasmInstanceObject.
class Realm {
JSRuntime* runtime_;
InstanceVector instances_;
public: explicit Realm(JSRuntime* rt);
~Realm();
// Before a WasmInstanceObject can be considered fully constructed and // valid, it must be registered with the Realm. If this method fails, // an error has been reported and the instance object must be abandoned. // After a successful registration, an Instance must call // unregisterInstance() before being destroyed.
// Return a vector of all live instances in the realm. The lifetime of // these Instances is determined by their owning WasmInstanceObject. // Note that accessing instances()[i]->object() triggers a read barrier // since instances() is effectively a weak list.
// Interrupt all running wasm Instances that have been registered with // wasm::Realms in the given JSContext.
externvoid InterruptRunningCode(JSContext* cx);
// After a wasm Instance sees an interrupt request and calls // CheckForInterrupt(), it should call RunningCodeInterrupted() to clear the // interrupt request for all wasm Instances to avoid spurious trapping.
void ResetInterruptState(JSContext* cx);
} // namespace wasm
} // namespace js
#endif// wasm_realm_h
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.