File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -241,17 +241,18 @@ std::string ContextBase::makeRootLogPrefix(string_view vm_id) const {
241241//
242242bool ContextBase::onStart (std::shared_ptr<PluginBase> plugin) {
243243 DeferAfterCallActions actions (this );
244- bool result = 0 ;
244+ bool result = true ;
245245 if (wasm_->on_context_create_ ) {
246246 plugin_ = plugin;
247247 wasm_->on_context_create_ (this , id_, 0 );
248248 plugin_.reset ();
249249 }
250250 if (wasm_->on_vm_start_ ) {
251+ // Do not set plugin_ as the on_vm_start handler should be independent of the plugin since the
252+ // specific plugin which ends up calling it is not necessarily known by the Wasm module.
251253 result =
252254 wasm_->on_vm_start_ (this , id_, static_cast <uint32_t >(wasm ()->vm_configuration ().size ()))
253255 .u64_ != 0 ;
254- plugin_.reset ();
255256 }
256257 return result;
257258}
You can’t perform that action at this time.
0 commit comments