refactor: only pass v8::Context
to gin_helper::MicrotasksScope
constructor (#45484)
refactor: forward v8::Context to v8::MicrotasksScope constructor
This commit is contained in:
parent
326957009a
commit
517935cd55
14 changed files with 23 additions and 37 deletions
|
@ -268,8 +268,7 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
|||
void DispatchToCallback(
|
||||
base::RepeatingCallback<ReturnType(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
args_->GetHolderCreationContext(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
args_->Return(
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...));
|
||||
|
@ -280,8 +279,7 @@ class Invoker<std::index_sequence<indices...>, ArgTypes...>
|
|||
// that have the void return type.
|
||||
void DispatchToCallback(base::RepeatingCallback<void(ArgTypes...)> callback) {
|
||||
gin_helper::MicrotasksScope microtasks_scope{
|
||||
args_->isolate(),
|
||||
args_->GetHolderCreationContext()->GetMicrotaskQueue(), true,
|
||||
args_->GetHolderCreationContext(), true,
|
||||
v8::MicrotasksScope::kRunMicrotasks};
|
||||
callback.Run(std::move(ArgumentHolder<indices, ArgTypes>::value)...);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue