forked from v8/v8
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[esnext] Update String.p.matchAll as per spec changes
As per (tc39/proposal-string-matchall#41), String.p.matchAll's fallback was removed. Additionally, removed a IsNullOrUndefined check that was already covered by MaybeCallFunctionAtSymbol. Updates to Test262 has been submitted: tc39/test262#1990 Bug: v8:6890 Change-Id: I246cbbcb4641ebded704c5f772809f182deaa30e Reviewed-on: https://chromium-review.googlesource.com/c/1369091 Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Mathias Bynens <mathias@chromium.org> Cr-Commit-Position: refs/heads/master@{#58172}
- Loading branch information
1 parent
63d6b75
commit 29a970a
Showing
3 changed files
with
46 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright 2018 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-string-matchall | ||
|
||
delete RegExp.prototype[Symbol.matchAll]; | ||
const str = 'a'; | ||
assertThrows(() => str.matchAll(/\w/g), TypeError); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters