fix: gin_helper::MicrotasksScope instantiation (#43185)
This commit is contained in:
parent
e64302cc91
commit
6877671390
12 changed files with 55 additions and 44 deletions
|
@ -267,9 +267,10 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
|||
template <typename ReturnType>
|
||||
void DispatchToCallback(
|
||||
base::RepeatingCallback<ReturnType(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true);
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
args_->Return(
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...));
|
||||
}
|
||||
|
@ -278,9 +279,10 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
|||
// expression to foo. As a result, we must specialize the case of Callbacks
|
||||
// that have the void return type.
|
||||
void DispatchToCallback(base::RepeatingCallback<void(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope(
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true);
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue