diff --git a/shell/common/gin_helper/callback.h b/shell/common/gin_helper/callback.h index 2bd104d243cf..7be65ec6d4e3 100644 --- a/shell/common/gin_helper/callback.h +++ b/shell/common/gin_helper/callback.h @@ -5,8 +5,8 @@ #ifndef ELECTRON_SHELL_COMMON_GIN_HELPER_CALLBACK_H_ #define ELECTRON_SHELL_COMMON_GIN_HELPER_CALLBACK_H_ +#include #include -#include #include "base/functional/bind.h" #include "shell/common/gin_converters/std_converter.h" @@ -54,7 +54,7 @@ struct V8FunctionInvoker(ArgTypes...)> { isolate, context->GetMicrotaskQueue(), true, v8::MicrotasksScope::kRunMicrotasks}; v8::Context::Scope context_scope(context); - std::vector> args{ + std::array, sizeof...(raw)> args{ gin::ConvertToV8(isolate, std::forward(raw))...}; v8::MaybeLocal ret = holder->Call( context, holder, args.size(), args.empty() ? nullptr : &args.front()); @@ -80,7 +80,7 @@ struct V8FunctionInvoker { isolate, context->GetMicrotaskQueue(), true, v8::MicrotasksScope::kRunMicrotasks}; v8::Context::Scope context_scope(context); - std::vector> args{ + std::array, sizeof...(raw)> args{ gin::ConvertToV8(isolate, std::forward(raw))...}; holder ->Call(context, holder, args.size(), @@ -105,7 +105,7 @@ struct V8FunctionInvoker { isolate, context->GetMicrotaskQueue(), true, v8::MicrotasksScope::kRunMicrotasks}; v8::Context::Scope context_scope(context); - std::vector> args{ + std::array, sizeof...(raw)> args{ gin::ConvertToV8(isolate, std::forward(raw))...}; v8::Local result; auto maybe_result = holder->Call(context, holder, args.size(),