[flags] Remove --harmony-promise-any
It's shipped since M85. Bug: v8:9808 Change-Id: I0c2dcda601aad33d4acb379b242799f9b09e8930 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2510869 Commit-Queue: Shu-yu Guo <syg@chromium.org> Reviewed-by: Marja Hölttä <marja@chromium.org> Cr-Commit-Position: refs/heads/master@{#71137}
This commit is contained in:
parent
dd80f2e4cf
commit
f1ae68351f
@ -280,7 +280,6 @@ DEFINE_IMPLICATION(harmony_weak_refs_with_cleanup_some, harmony_weak_refs)
|
||||
#define HARMONY_SHIPPING_BASE(V) \
|
||||
V(harmony_sharedarraybuffer, "harmony sharedarraybuffer") \
|
||||
V(harmony_atomics, "harmony atomics") \
|
||||
V(harmony_promise_any, "harmony Promise.any") \
|
||||
V(harmony_private_methods, "harmony private methods in class literals") \
|
||||
V(harmony_weak_refs, "harmony weak references") \
|
||||
V(harmony_string_replaceall, "harmony String.prototype.replaceAll") \
|
||||
|
@ -2393,6 +2393,10 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
||||
InstallFunctionWithBuiltinId(isolate_, promise_fun, "allSettled",
|
||||
Builtins::kPromiseAllSettled, 1, true);
|
||||
|
||||
Handle<JSFunction> promise_any = InstallFunctionWithBuiltinId(
|
||||
isolate_, promise_fun, "any", Builtins::kPromiseAny, 1, true);
|
||||
native_context()->set_promise_any(*promise_any);
|
||||
|
||||
InstallFunctionWithBuiltinId(isolate_, promise_fun, "race",
|
||||
Builtins::kPromiseRace, 1, true);
|
||||
|
||||
@ -2652,6 +2656,11 @@ void Genesis::InitializeGlobal(Handle<JSGlobalObject> global_object,
|
||||
InstallError(isolate_, global, factory->Error_string(),
|
||||
Context::ERROR_FUNCTION_INDEX);
|
||||
|
||||
// -- A g g r e g a t e E r r o r
|
||||
InstallError(isolate_, global, factory->AggregateError_string(),
|
||||
Context::AGGREGATE_ERROR_FUNCTION_INDEX,
|
||||
Builtins::kAggregateErrorConstructor, 2, 2);
|
||||
|
||||
// -- E v a l E r r o r
|
||||
InstallError(isolate_, global, factory->EvalError_string(),
|
||||
Context::EVAL_ERROR_FUNCTION_INDEX);
|
||||
@ -4339,34 +4348,6 @@ void Genesis::InitializeGlobal_harmony_weak_refs_with_cleanup_some() {
|
||||
DONT_ENUM);
|
||||
}
|
||||
|
||||
void Genesis::InitializeGlobal_harmony_promise_any() {
|
||||
if (!FLAG_harmony_promise_any) {
|
||||
return;
|
||||
}
|
||||
|
||||
Factory* factory = isolate()->factory();
|
||||
Handle<JSGlobalObject> global(native_context()->global_object(), isolate());
|
||||
|
||||
InstallError(isolate_, global, factory->AggregateError_string(),
|
||||
Context::AGGREGATE_ERROR_FUNCTION_INDEX,
|
||||
Builtins::kAggregateErrorConstructor, 2, 2);
|
||||
|
||||
// Setup %AggregateErrorPrototype%.
|
||||
Handle<JSFunction> aggregate_error_function(
|
||||
native_context()->aggregate_error_function(), isolate());
|
||||
Handle<JSObject> prototype(
|
||||
JSObject::cast(aggregate_error_function->instance_prototype()),
|
||||
isolate());
|
||||
|
||||
Handle<JSFunction> promise_fun(
|
||||
JSFunction::cast(
|
||||
isolate()->native_context()->get(Context::PROMISE_FUNCTION_INDEX)),
|
||||
isolate());
|
||||
Handle<JSFunction> promise_any = InstallFunctionWithBuiltinId(
|
||||
isolate_, promise_fun, "any", Builtins::kPromiseAny, 1, true);
|
||||
native_context()->set_promise_any(*promise_any);
|
||||
}
|
||||
|
||||
void Genesis::InitializeGlobal_harmony_regexp_match_indices() {
|
||||
if (!FLAG_harmony_regexp_match_indices) return;
|
||||
|
||||
|
@ -259,7 +259,6 @@ RUNTIME_FUNCTION(Runtime_ResolvePromise) {
|
||||
// A helper function to be called when constructing AggregateError objects. This
|
||||
// takes care of the Error-related construction, e.g., stack traces.
|
||||
RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) {
|
||||
DCHECK(FLAG_harmony_promise_any);
|
||||
HandleScope scope(isolate);
|
||||
DCHECK_EQ(3, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0);
|
||||
@ -278,7 +277,6 @@ RUNTIME_FUNCTION(Runtime_ConstructAggregateErrorHelper) {
|
||||
// A helper function to be called when constructing AggregateError objects. This
|
||||
// takes care of the Error-related construction, e.g., stack traces.
|
||||
RUNTIME_FUNCTION(Runtime_ConstructInternalAggregateErrorHelper) {
|
||||
DCHECK(FLAG_harmony_promise_any);
|
||||
HandleScope scope(isolate);
|
||||
DCHECK_GE(args.length(), 1);
|
||||
CONVERT_ARG_HANDLE_CHECKED(Smi, message, 0);
|
||||
|
@ -1,8 +1,6 @@
|
||||
// Copyright 2020 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --harmony-promise-any
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and a
|
||||
// Promise p3 created by Promise.any has a catch handler, and is rejected
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --harmony-promise-any --ignore-unhandled-promises
|
||||
// Flags: --ignore-unhandled-promises
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and a
|
||||
// Promise p3 created by Promise.any has no catch handler, and is rejected
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --async-stack-traces --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax --async-stack-traces
|
||||
|
||||
// Basic test with Promise.any().
|
||||
(function() {
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --allow-unsafe-function-constructor --harmony-promise-any
|
||||
// Flags: --allow-unsafe-function-constructor
|
||||
|
||||
|
||||
(function testReflectConstructArity() {
|
||||
|
@ -2,8 +2,6 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --harmony-promise-any
|
||||
|
||||
(function TestNoParameters() {
|
||||
// Can't omit the "errors" parameter; there's nothing to iterate.
|
||||
assertThrows(() => { new AggregateError(); });
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
load('test/mjsunit/test-async.js');
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
load('test/mjsunit/test-async.js');
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
load('test/mjsunit/test-async.js');
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --allow-natives-syntax --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
load('test/mjsunit/test-async.js');
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Flags: --allow-natives-syntax --harmony-promise-any
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
load('test/mjsunit/test-async.js');
|
||||
|
||||
|
@ -59,9 +59,7 @@ FEATURE_FLAGS = {
|
||||
'regexp-named-groups': '--harmony-regexp-match-indices',
|
||||
'class-methods-private': '--harmony-private-methods',
|
||||
'class-static-methods-private': '--harmony-private-methods',
|
||||
'AggregateError': '--harmony-promise-any',
|
||||
'logical-assignment-operators': '--harmony-logical-assignment',
|
||||
'Promise.any': '--harmony-promise-any',
|
||||
'Atomics.waitAsync': '--harmony-atomics-waitasync',
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user