Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,18 @@ std::string ContextBase::makeRootLogPrefix(string_view vm_id) const {
//
bool ContextBase::onStart(std::shared_ptr<PluginBase> plugin) {
DeferAfterCallActions actions(this);
bool result = 0;
bool result = true;
if (wasm_->on_context_create_) {
plugin_ = plugin;
wasm_->on_context_create_(this, id_, 0);
plugin_.reset();
}
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;
plugin_.reset();
}
return result;
}
Expand Down