message: v8: set context when calling __GLOBAL__ functions.
diff: @@ -114,6 +114,8 @@ public:
  private:
  void callModuleFunction(Context* context, absl::string_view functionName, const wasm::Val args[],
  wasm::Val results[]);
  + void callModuleFunction(Context* context, absl::string_view functionName, const wasm::Func* func,
  + const wasm::Val args[], wasm::Val results[]);
  template <typename T>
  std::unique_ptr<Global<T>> registerHostGlobalImpl(absl::string_view moduleName,
  @@ -448,13 +450,7 @@ void V8::start(Context* context) {
  for (const auto& kv : module_functions_) {
  if (absl::StartsWith(kv.first, "__GLOBAL__")) {
  - const wasm::Func* func = kv.second.get();
  - auto trap = func->call(nullptr, nullptr);
  - if (trap) {
  - throw WasmVmException(
  - fmt::format("Function: {} failed: {}", kv.first,
  - absl::string_view(trap->message().get(), trap->message().size())));
  - }
  + callModuleFunction(context, kv.first, kv.second.get(), nullptr, nullptr);
  }
  }
  }
  @@ -464,12 +460,17 @@ void V8::start(Context* context) {
  void V8::callModuleFunction(Context* context, absl::string_view functionName,
  const wasm::Val args[], wasm::Val results[]) {
  - ENVOY_LOG(trace, "[wasm] callModuleFunction(\"{}\")", functionName);
  - current_context_ = context;
  -
  auto it = module_functions_.find(functionName);
  if (it != module_functions_.end()) {
  - const wasm::Func* func = it->second.get();
  + callModuleFunction(context, functionName, it->second.get(), args, results);
  + }
  +}
  +
  +void V8::callModuleFunction(Context* context, absl::string_view functionName,
  + const wasm::Func* func, const wasm::Val args[], wasm::Val results[]) {
  + ENVOY_LOG(trace, "[wasm] callModuleFunction(\"{}\")", functionName);
  +
  + current_context_ = context;
  auto trap = func->call(args, results);
  if (trap) {
  throw WasmVmException(
  @@ -477,7 +478,6 @@ void V8::callModuleFunction(Context* context, absl::string_view functionName,
  absl::string_view(trap->message().get(), trap->message().size())));
  }
  }
  -}
  absl::string_view V8::getMemory(uint32_t pointer, uint32_t size) {
  ENVOY_LOG(trace, "[wasm] getMemory({}, {})", pointer, size);
  