Revert "Create a MicrotasksScope for async GC"

This reverts commit 46a5dd0256.

Reason for revert: Closed the waterfall, seems to be causing timeouts: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Mac64/49979/overview

Original change's description:
> Create a MicrotasksScope for async GC
>
> When running the async version of window.gc()
> (e.g. window.gc({type: 'major', execution: 'async'})),
> the promise is resolved without a MicrotasksScope, causing us to hit a
> DCHECK.
>
> Change-Id: I10f72c96605263afacc01afbfcc56d1134d84b43
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4220146
> Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
> Commit-Queue: Kevin McNee <mcnee@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#85698}

Change-Id: I34edd72d28a126d93e6ba68ed64b3a9f965f62e3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4224395
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#85699}
This commit is contained in:
Leszek Swirski 2023-02-07 08:37:48 +00:00 committed by V8 LUCI CQ
parent 46a5dd0256
commit cdb12d8703

View File

@ -5,7 +5,6 @@
#include "src/extensions/gc-extension.h" #include "src/extensions/gc-extension.h"
#include "include/v8-isolate.h" #include "include/v8-isolate.h"
#include "include/v8-microtask-queue.h"
#include "include/v8-object.h" #include "include/v8-object.h"
#include "include/v8-persistent-handle.h" #include "include/v8-persistent-handle.h"
#include "include/v8-primitive.h" #include "include/v8-primitive.h"
@ -122,8 +121,6 @@ class AsyncGC final : public CancelableTask {
InvokeGC(isolate_, ExecutionType::kAsync, type_); InvokeGC(isolate_, ExecutionType::kAsync, type_);
auto resolver = v8::Local<v8::Promise::Resolver>::New(isolate_, resolver_); auto resolver = v8::Local<v8::Promise::Resolver>::New(isolate_, resolver_);
auto ctx = Local<v8::Context>::New(isolate_, ctx_); auto ctx = Local<v8::Context>::New(isolate_, ctx_);
v8::MicrotasksScope microtasks_scope(
ctx, v8::MicrotasksScope::kDoNotRunMicrotasks);
resolver->Resolve(ctx, v8::Undefined(isolate_)).ToChecked(); resolver->Resolve(ctx, v8::Undefined(isolate_)).ToChecked();
} }