Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Issue 1762183002: Base the right RegExp brand checks on Symbol.match (Closed)

Created:
4 years, 9 months ago by Dan Ehrenberg
Modified:
4 years, 9 months ago
Reviewers:
yangguo, Yang
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Base the right RegExp brand checks on Symbol.match The ES2015 specification requires that String.prototype.startsWith, String.prototype.endsWith and String.prototype.includes use the IsRegExp internal algorithm to determine whether to throw a TypeError to prevent a RegExp from being accidentally cast to a String for those methods. That internal algorithm checks the presence/truthiness of Symbol.match to make its determination. This patch switches the builtins to use this correct test, rather than checking for the [[RegExpMatcher]] internal slot as the builtins previously did. R=yangguo Committed: https://crrev.com/e99d292909f4a2ad055bfce16ce96018d816fa8f Cr-Commit-Position: refs/heads/master@{#34547}

Patch Set 1 #

Patch Set 2 : Enable newly passing test262 tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -6 lines) Patch
M src/js/regexp.js View 1 chunk +1 line, -0 lines 0 comments Download
M src/js/string.js View 5 chunks +5 lines, -3 lines 0 comments Download
M test/mjsunit/es6/string-endswith.js View 1 chunk +8 lines, -0 lines 0 comments Download
M test/mjsunit/es6/string-includes.js View 1 chunk +8 lines, -0 lines 0 comments Download
M test/mjsunit/es6/string-startswith.js View 1 chunk +8 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (7 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1762183002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1762183002/1
4 years, 9 months ago (2016-03-04 01:32:05 UTC) #2
Dan Ehrenberg
4 years, 9 months ago (2016-03-04 01:32:10 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/13210) v8_mac_rel on ...
4 years, 9 months ago (2016-03-04 01:42:57 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1762183002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1762183002/20001
4 years, 9 months ago (2016-03-04 01:56:18 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-04 04:01:07 UTC) #9
Yang
LGTM. Are there any performance impacts? Also, please send future reviews to my @chromium.org address, ...
4 years, 9 months ago (2016-03-07 06:54:02 UTC) #11
Dan Ehrenberg
On 2016/03/07 at 06:54:02, yangguo wrote: > LGTM. Are there any performance impacts? > > ...
4 years, 9 months ago (2016-03-07 15:38:21 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1762183002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1762183002/20001
4 years, 9 months ago (2016-03-07 15:38:28 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 9 months ago (2016-03-07 16:04:33 UTC) #15
commit-bot: I haz the power
4 years, 9 months ago (2016-03-07 16:06:02 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/e99d292909f4a2ad055bfce16ce96018d816fa8f
Cr-Commit-Position: refs/heads/master@{#34547}

Powered by Google App Engine
This is Rietveld 408576698