Revert of Disable non-standard Promise functions in staging (patchset #5 id:80001 of https://codereview.chromium.org/1469543003/ )
Reason for revert: [Sheriff] This breaks ignition on arm sim debug: https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20arm%20-%20sim%20-%20debug/builds/5317 Seems to not be caught by the cq bot that builds release with dchecks. Original issue's description: > Disable non-standard Promise functions in staging > > This patch removes Promise functions and methods which are absent > from the ES2015 specification when the --es-staging flag is on. > > BUG=v8:3237 > R=rossberg > LOG=Y > > Committed: https://crrev.com/941251af7e04d50ac2243da2870249a42111221a > Cr-Commit-Position: refs/heads/master@{#32194} TBR=rossberg@chromium.org,littledan@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:3237 Review URL: https://codereview.chromium.org/1473603002 Cr-Commit-Position: refs/heads/master@{#32199}
This commit is contained in:
parent
09fb5686e6
commit
86bd2b3c23
3
BUILD.gn
3
BUILD.gn
@ -320,8 +320,7 @@ action("js2c_experimental") {
|
||||
"src/js/harmony-reflect.js",
|
||||
"src/js/harmony-object-observe.js",
|
||||
"src/js/harmony-sharedarraybuffer.js",
|
||||
"src/js/harmony-simd.js",
|
||||
"src/js/promise-extra.js"
|
||||
"src/js/harmony-simd.js"
|
||||
]
|
||||
|
||||
outputs = [
|
||||
|
@ -206,7 +206,6 @@ class Genesis BASE_EMBEDDED {
|
||||
HARMONY_INPROGRESS(DECLARE_FEATURE_INITIALIZATION)
|
||||
HARMONY_STAGED(DECLARE_FEATURE_INITIALIZATION)
|
||||
HARMONY_SHIPPING(DECLARE_FEATURE_INITIALIZATION)
|
||||
DECLARE_FEATURE_INITIALIZATION(promise_extra, "")
|
||||
#undef DECLARE_FEATURE_INITIALIZATION
|
||||
|
||||
Handle<JSFunction> InstallInternalArray(Handle<JSObject> target,
|
||||
@ -1525,7 +1524,6 @@ void Genesis::InitializeExperimentalGlobal() {
|
||||
HARMONY_INPROGRESS(FEATURE_INITIALIZE_GLOBAL)
|
||||
HARMONY_STAGED(FEATURE_INITIALIZE_GLOBAL)
|
||||
HARMONY_SHIPPING(FEATURE_INITIALIZE_GLOBAL)
|
||||
FEATURE_INITIALIZE_GLOBAL(promise_extra, "")
|
||||
#undef FEATURE_INITIALIZE_GLOBAL
|
||||
}
|
||||
|
||||
@ -2065,7 +2063,6 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_completion)
|
||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_tolength)
|
||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_do_expressions)
|
||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_regexp_lookbehind)
|
||||
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(promise_extra)
|
||||
|
||||
|
||||
static void SimpleInstallFunction(Handle<JSObject> base, Handle<Name> name,
|
||||
@ -2599,8 +2596,6 @@ bool Genesis::InstallExperimentalNatives() {
|
||||
static const char* harmony_do_expressions_natives[] = {nullptr};
|
||||
static const char* harmony_regexp_subclass_natives[] = {nullptr};
|
||||
static const char* harmony_regexp_lookbehind_natives[] = {nullptr};
|
||||
static const char* promise_extra_natives[] = {"native promise-extra.js",
|
||||
nullptr};
|
||||
|
||||
for (int i = ExperimentalNatives::GetDebuggerCount();
|
||||
i < ExperimentalNatives::GetBuiltinsCount(); i++) {
|
||||
@ -2619,7 +2614,6 @@ bool Genesis::InstallExperimentalNatives() {
|
||||
HARMONY_INPROGRESS(INSTALL_EXPERIMENTAL_NATIVES);
|
||||
HARMONY_STAGED(INSTALL_EXPERIMENTAL_NATIVES);
|
||||
HARMONY_SHIPPING(INSTALL_EXPERIMENTAL_NATIVES);
|
||||
INSTALL_EXPERIMENTAL_NATIVES(promise_extra, "");
|
||||
#undef INSTALL_EXPERIMENTAL_NATIVES
|
||||
}
|
||||
|
||||
|
@ -189,10 +189,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
|
||||
// ES2015 const semantics are staged
|
||||
DEFINE_NEG_IMPLICATION(harmony, legacy_const)
|
||||
|
||||
DEFINE_BOOL(promise_extra, true, "additional V8 Promise functions")
|
||||
// Removing extra Promise functions is staged
|
||||
DEFINE_NEG_IMPLICATION(es_staging, promise_extra)
|
||||
|
||||
// Activate on ClusterFuzz.
|
||||
DEFINE_IMPLICATION(es_staging, harmony_destructuring_bind)
|
||||
|
||||
|
@ -202,9 +202,6 @@ function PostNatives(utils) {
|
||||
"ObserveArrayMethods",
|
||||
"ObserveObjectMethods",
|
||||
"OwnPropertyKeys",
|
||||
"PromiseChain",
|
||||
"PromiseDeferred",
|
||||
"PromiseResolved",
|
||||
"SameValueZero",
|
||||
"SetIterator",
|
||||
"SetIteratorNext",
|
||||
|
@ -1,30 +0,0 @@
|
||||
// Copyright 2015 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.
|
||||
|
||||
(function(global, utils) {
|
||||
|
||||
"use strict";
|
||||
|
||||
%CheckIsBootstrapping();
|
||||
|
||||
var GlobalPromise = global.Promise;
|
||||
|
||||
var PromiseChain = utils.ImportNow("PromiseChain");
|
||||
var PromiseDeferred = utils.ImportNow("PromiseDeferred");
|
||||
var PromiseResolved = utils.ImportNow("PromiseResolved");
|
||||
|
||||
utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
|
||||
"chain", PromiseChain,
|
||||
]);
|
||||
|
||||
%InstallToContext([
|
||||
"promise_chain", PromiseChain,
|
||||
]);
|
||||
|
||||
utils.InstallFunctions(GlobalPromise, DONT_ENUM, [
|
||||
"defer", PromiseDeferred,
|
||||
"accept", PromiseResolved,
|
||||
]);
|
||||
|
||||
})
|
@ -446,6 +446,8 @@ function PromiseHasUserDefinedRejectHandler() {
|
||||
DONT_ENUM | READ_ONLY);
|
||||
|
||||
utils.InstallFunctions(GlobalPromise, DONT_ENUM, [
|
||||
"defer", PromiseDeferred,
|
||||
"accept", PromiseResolved,
|
||||
"reject", PromiseRejected,
|
||||
"all", PromiseAll,
|
||||
"race", PromiseRace,
|
||||
@ -453,12 +455,14 @@ utils.InstallFunctions(GlobalPromise, DONT_ENUM, [
|
||||
]);
|
||||
|
||||
utils.InstallFunctions(GlobalPromise.prototype, DONT_ENUM, [
|
||||
"chain", PromiseChain,
|
||||
"then", PromiseThen,
|
||||
"catch", PromiseCatch
|
||||
]);
|
||||
|
||||
%InstallToContext([
|
||||
"promise_catch", PromiseCatch,
|
||||
"promise_chain", PromiseChain,
|
||||
"promise_create", PromiseCreate,
|
||||
"promise_has_user_defined_reject_handler", PromiseHasUserDefinedRejectHandler,
|
||||
"promise_reject", PromiseReject,
|
||||
@ -475,14 +479,4 @@ utils.InstallFunctions(extrasUtils, 0, [
|
||||
"rejectPromise", PromiseReject
|
||||
]);
|
||||
|
||||
// TODO(v8:4567): Allow experimental natives to remove function prototype
|
||||
[PromiseChain, PromiseDeferred, PromiseResolved].forEach(
|
||||
fn => %FunctionRemovePrototype(fn));
|
||||
|
||||
utils.Export(function(to) {
|
||||
to.PromiseChain = PromiseChain;
|
||||
to.PromiseDeferred = PromiseDeferred;
|
||||
to.PromiseResolved = PromiseResolved;
|
||||
});
|
||||
|
||||
})
|
||||
|
@ -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: --expose-debug-as debug --promise-extra
|
||||
// Flags: --expose-debug-as debug
|
||||
|
||||
// Test reentry of special try catch for Promises.
|
||||
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we listen to uncaught exceptions and
|
||||
// the Promise is rejected in a chained closure after it has been resolved.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we listen to all exceptions and
|
||||
// there is a catch handler for the to-be-rejected Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions, the Promise
|
||||
// is rejected, and a catch handler is installed right before the rejection.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and
|
||||
// there is a catch handler for the to-be-rejected Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we listen to all exceptions and
|
||||
// there is a catch handler for the to-be-rejected Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and
|
||||
// there is no catch handler for the to-be-rejected Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when a Promise is rejected, which is caught by a custom
|
||||
// promise, which has a number for reject closure. We expect an Exception debug
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when a Promise is rejected, which is caught by a
|
||||
// custom promise, which throws a new exception in its reject handler.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when a Promise is rejected, which is caught by a custom
|
||||
// promise, which has undefined for reject closure. We expect an Exception
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we listen to all exceptions and
|
||||
// there is a catch handler for the exception thrown in a Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions, the Promise
|
||||
// throws, and a catch handler is installed right before throwing.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and
|
||||
// there is a catch handler for the exception thrown in a Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we listen to all exceptions and
|
||||
// there is no catch handler for the exception thrown in a Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when we only listen to uncaught exceptions and
|
||||
// there is a catch handler for the exception thrown in a Promise.
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when an exception is thrown inside a Promise, which is
|
||||
// caught by a custom promise, which throws a new exception in its reject
|
||||
|
@ -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: --expose-debug-as debug --allow-natives-syntax --promise-extra
|
||||
// Flags: --expose-debug-as debug --allow-natives-syntax
|
||||
|
||||
// Test debug events when an exception is thrown inside a Promise, which is
|
||||
// caught by a custom promise, which has no reject handler.
|
||||
|
@ -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: --promise-extra
|
||||
|
||||
'use strict';
|
||||
|
||||
Object.defineProperties(Object.prototype, {
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --allow-natives-syntax --harmony-tostring --promise-extra
|
||||
// Flags: --allow-natives-syntax --harmony-tostring
|
||||
|
||||
// Make sure we don't rely on functions patchable by monkeys.
|
||||
var call = Function.prototype.call.call.bind(Function.prototype.call)
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --allow-natives-syntax --promise-extra
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
|
@ -1879,7 +1879,6 @@
|
||||
'../../src/js/harmony-object-observe.js',
|
||||
'../../src/js/harmony-sharedarraybuffer.js',
|
||||
'../../src/js/harmony-simd.js',
|
||||
'../../src/js/promise-extra.js',
|
||||
],
|
||||
'code_stub_library_files': [
|
||||
'../../src/js/macros.py',
|
||||
|
Loading…
Reference in New Issue
Block a user