Move trap handler initialization to per-Store (#1644)
Previously we initialized trap handling (signals/etc) once-per-instance but that's a bit too granular since we only need to do this as one-time per-program initialization. This moves the initialization to `Store` instead which means that we'll call this at least once per thread, which some platforms may need (none currently do, they all only need per-program initialization, but Fuchsia will need per-thread initialization).
This commit is contained in:
@@ -7,7 +7,6 @@ use crate::imports::Imports;
|
||||
use crate::jit_int::GdbJitImageRegistration;
|
||||
use crate::memory::{DefaultMemoryCreator, RuntimeLinearMemory, RuntimeMemoryCreator};
|
||||
use crate::table::Table;
|
||||
use crate::traphandlers;
|
||||
use crate::traphandlers::Trap;
|
||||
use crate::vmcontext::{
|
||||
VMBuiltinFunctionsArray, VMCallerCheckedAnyfunc, VMContext, VMFunctionBody, VMFunctionImport,
|
||||
@@ -886,10 +885,6 @@ impl InstanceHandle {
|
||||
);
|
||||
*instance.interrupts() = &*instance.interrupts;
|
||||
|
||||
// Ensure that our signal handlers are ready for action.
|
||||
// TODO: Move these calls out of `InstanceHandle`.
|
||||
traphandlers::init();
|
||||
|
||||
// Perform infallible initialization in this constructor, while fallible
|
||||
// initialization is deferred to the `initialize` method.
|
||||
initialize_passive_elements(instance);
|
||||
|
||||
Reference in New Issue
Block a user