@@ -32,6 +32,7 @@ namespace proxy_wasm {
32
32
#include " proxy_wasm_common.h"
33
33
#include " proxy_wasm_enums.h"
34
34
35
+ class PluginHandleBase ;
35
36
class WasmBase ;
36
37
class WasmVm ;
37
38
@@ -143,7 +144,7 @@ class ContextBase : public RootInterface,
143
144
ContextBase (WasmBase *wasm); // Vm Context.
144
145
ContextBase (WasmBase *wasm, std::shared_ptr<PluginBase> plugin); // Root Context.
145
146
ContextBase (WasmBase *wasm, uint32_t parent_context_id,
146
- std::shared_ptr<PluginBase> plugin ); // Stream context.
147
+ std::shared_ptr<PluginHandleBase> plugin_handle ); // Stream context.
147
148
virtual ~ContextBase ();
148
149
149
150
WasmBase *wasm () const { return wasm_; }
@@ -394,12 +395,13 @@ class ContextBase : public RootInterface,
394
395
395
396
WasmBase *wasm_{nullptr };
396
397
uint32_t id_{0 };
397
- uint32_t parent_context_id_{0 }; // 0 for roots and the general context.
398
- ContextBase *parent_context_{nullptr }; // set in all contexts.
399
- std::string root_id_; // set only in root context.
400
- std::string root_log_prefix_; // set only in root context.
401
- std::shared_ptr<PluginBase> plugin_; // set in root and stream contexts.
402
- std::shared_ptr<PluginBase> temp_plugin_; // Remove once ABI v0.1.0 is gone.
398
+ uint32_t parent_context_id_{0 }; // 0 for roots and the general context.
399
+ ContextBase *parent_context_{nullptr }; // set in all contexts.
400
+ std::string root_id_; // set only in root context.
401
+ std::string root_log_prefix_; // set only in root context.
402
+ std::shared_ptr<PluginBase> plugin_; // set in root and stream contexts.
403
+ std::shared_ptr<PluginHandleBase> plugin_handle_; // set only in stream context.
404
+ std::shared_ptr<PluginBase> temp_plugin_; // Remove once ABI v0.1.0 is gone.
403
405
bool in_vm_context_created_ = false ;
404
406
bool destroyed_ = false ;
405
407
bool stream_failed_ = false ; // Set true after failStream is called in case of VM failure.
0 commit comments