Revert "Resolving or rejecting promises doesn't execute script"
This reverts commit f2741b13ba
.
Reason for revert: breaks blink linux bot https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Blink%20Linux%20Debug/9089/blamelist
Original change's description:
> Resolving or rejecting promises doesn't execute script
>
> It just enqueues a microtask.
>
> Bug: chromium:728583
> Change-Id: Iecbc6f33db8a94acd10d9ae1f2173700d872ac50
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2827906
> Reviewed-by: Camillo Bruni <cbruni@chromium.org>
> Commit-Queue: Jochen Eisinger <jochen@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#74036}
Bug: chromium:728583
Change-Id: I09a750b9c5cf43adedb395949e246421eeaf0a09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2839547
Auto-Submit: Sathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org>
Commit-Queue: Sathya Gunasekaran <gsathya@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/master@{#74059}
This commit is contained in:
parent
b9325542aa
commit
4499f9d2cf
6
BUILD.gn
6
BUILD.gn
@ -309,9 +309,6 @@ declare_args() {
|
||||
|
||||
# Enable map packing & unpacking (sets -dV8_MAP_PACKING).
|
||||
v8_enable_map_packing = false
|
||||
|
||||
# Allow for JS promise hooks (instead of just C++).
|
||||
v8_allow_javascript_in_promise_hooks = false
|
||||
}
|
||||
|
||||
# Derived defaults.
|
||||
@ -840,9 +837,6 @@ config("features") {
|
||||
if (v8_dict_property_const_tracking) {
|
||||
defines += [ "V8_DICT_PROPERTY_CONST_TRACKING" ]
|
||||
}
|
||||
if (v8_allow_javascript_in_promise_hooks) {
|
||||
defines += [ "V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("toolchain") {
|
||||
|
@ -7268,13 +7268,8 @@ Local<Promise> Promise::Resolver::GetPromise() {
|
||||
Maybe<bool> Promise::Resolver::Resolve(Local<Context> context,
|
||||
Local<Value> value) {
|
||||
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
|
||||
#if defined(V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS)
|
||||
ENTER_V8(isolate, context, Promise_Resolver, Resolve, Nothing<bool>(),
|
||||
i::HandleScope);
|
||||
#else
|
||||
ENTER_V8_NO_SCRIPT(isolate, context, Promise_Resolver, Resolve,
|
||||
Nothing<bool>(), i::HandleScope);
|
||||
#endif
|
||||
auto self = Utils::OpenHandle(this);
|
||||
auto promise = i::Handle<i::JSPromise>::cast(self);
|
||||
|
||||
@ -7291,13 +7286,8 @@ Maybe<bool> Promise::Resolver::Resolve(Local<Context> context,
|
||||
Maybe<bool> Promise::Resolver::Reject(Local<Context> context,
|
||||
Local<Value> value) {
|
||||
auto isolate = reinterpret_cast<i::Isolate*>(context->GetIsolate());
|
||||
#if defined(V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS)
|
||||
ENTER_V8(isolate, context, Promise_Resolver, Reject, Nothing<bool>(),
|
||||
i::HandleScope);
|
||||
#else
|
||||
ENTER_V8_NO_SCRIPT(isolate, context, Promise_Resolver, Reject,
|
||||
Nothing<bool>(), i::HandleScope);
|
||||
#endif
|
||||
auto self = Utils::OpenHandle(this);
|
||||
auto promise = i::Handle<i::JSPromise>::cast(self);
|
||||
|
||||
|
@ -1133,9 +1133,6 @@ TEST(TerminateExecutionTopLevelAwaitAsync) {
|
||||
CHECK(!try_catch.HasTerminated());
|
||||
|
||||
eval_promise->Resolve(env.local(), v8::Undefined(isolate)).ToChecked();
|
||||
#if !defined(V8_ALLOW_JAVASCRIPT_IN_PROMISE_HOOKS)
|
||||
isolate->PerformMicrotaskCheckpoint();
|
||||
#endif
|
||||
|
||||
CHECK(try_catch.HasCaught());
|
||||
CHECK(try_catch.HasTerminated());
|
||||
|
Loading…
Reference in New Issue
Block a user