File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -331,9 +331,24 @@ bool ContextBase::onStart(std::shared_ptr<PluginBase> plugin) {
331
331
}
332
332
333
333
bool ContextBase::onConfigure (std::shared_ptr<PluginBase> plugin) {
334
- if (isFailed () || !wasm_-> on_configure_ ) {
334
+ if (isFailed ()) {
335
335
return true ;
336
336
}
337
+
338
+ // on_context_create is yet to be executed for all the root contexts except the first one
339
+ if (!in_vm_context_created_ && wasm_->on_context_create_ ) {
340
+ DeferAfterCallActions actions (this );
341
+ wasm_->on_context_create_ (this , id_, 0 );
342
+ }
343
+
344
+ // NB: If no on_context_create function is registered the in-VM SDK is responsible for
345
+ // managing any required in-VM state.
346
+ in_vm_context_created_ = true ;
347
+
348
+ if (!wasm_->on_configure_ ) {
349
+ return true ;
350
+ }
351
+
337
352
DeferAfterCallActions actions (this );
338
353
plugin_ = plugin;
339
354
auto result =
You can’t perform that action at this time.
0 commit comments