Skip to content

on_vm_start is called multiple times when multiple plugins exist in a single VM. #192

@mathetake

Description

@mathetake

WasmBase::start is called for every plugin;

auto plugin_context = wasm_handle->wasm()->start(plugin);

and inside of it ContextBase::onStart is called:

if (!context_ptr->onStart(plugin)) {

that results in calling on_vm_start:

if (wasm_->on_vm_start_) {
// Do not set plugin_ as the on_vm_start handler should be independent of the plugin since the
// specific plugin which ends up calling it is not necessarily known by the Wasm module.
result =
wasm_->on_vm_start_(this, id_, static_cast<uint32_t>(wasm()->vm_configuration().size()))
.u64_ != 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions