fix: gin_helper::MicrotasksScope instantiation (#43210)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
ccd372457a
commit
10a8c258cb
12 changed files with 55 additions and 44 deletions
|
@ -262,9 +262,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)...));
|
||||
}
|
||||
|
@ -273,9 +274,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