chore: enable microtask queue per window agent (#36870)

* chore: enable microtask queue per window agent

* chore: switch policies on context microtask queue

* fix: ensure node::Environment is valid
This commit is contained in:
Robo 2023-01-12 01:59:32 +09:00 committed by GitHub
parent 2a7d0a84c0
commit fefb22a83d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 115 additions and 54 deletions

View file

@ -34,7 +34,8 @@ class V8Serializer : public v8::ValueSerializer::Delegate {
bool Serialize(v8::Local<v8::Value> value, blink::CloneableMessage* out) {
gin_helper::MicrotasksScope microtasks_scope(
isolate_, v8::MicrotasksScope::kDoNotRunMicrotasks);
isolate_, isolate_->GetCurrentContext()->GetMicrotaskQueue(),
v8::MicrotasksScope::kDoNotRunMicrotasks);
WriteBlinkEnvelope(19);
serializer_.WriteHeader();