cf7646c582
In 5742da056a
, the toString property was
accidentally applied to all NativeError prototypes, when it should only
be inherited from Error.prototype.
Refs: https://github.com/tc39/ecma262/issues/1794
Bug: v8:10017
Change-Id: I2af9a31f463deb9871dd7a4a5a2e4dd7485ed38c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1933054
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65355}
12 lines
419 B
JavaScript
12 lines
419 B
JavaScript
// Copyright 2019 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.
|
|
|
|
[
|
|
EvalError, RangeError, ReferenceError,
|
|
SyntaxError, TypeError, URIError,
|
|
].forEach((NativeError) => {
|
|
assertFalse(NativeError.prototype.hasOwnProperty('toString'));
|
|
assertEquals(NativeError.prototype.toString, Error.prototype.toString);
|
|
});
|