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

Issue 1543723002: Add web compat workarounds for ES2015 RegExp semantics (Closed)

Created:
5 years ago by Dan Ehrenberg
Modified:
5 years ago
Reviewers:
yangguo, Yang
CC:
caitp (gmail), Paweł Hajdan Jr., 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

Add web compat workarounds for ES2015 RegExp semantics Unexpectedly, websites depend on doing feature testing with RegExp.prototype.sticky and browser testing with RegExp.prototype.toString(). ES2015 newly throws exceptions for both of these. In order to enable shipping new ES2015 semantics, this patch puts in narrow workarounds for those two cases, keeping their old behavior. UseCounters are added for how often those particular cases come up, so we can see if it can be deprecated. R=yangguo BUG=v8:4637, v8:4617 LOG=Y CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:linux_chromium_rel_ng;tryserver.blink:linux_blink_rel Committed: https://crrev.com/98f819c3e0c92d54a306cdacadda73cf96d21b52 Cr-Commit-Position: refs/heads/master@{#32997}

Patch Set 1 #

Patch Set 2 : Fix lint error #

Patch Set 3 : Fix test expectations for new workaround #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -5 lines) Patch
M include/v8.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/js/harmony-regexp.js View 2 chunks +8 lines, -0 lines 0 comments Download
M src/js/regexp.js View 2 chunks +11 lines, -1 line 2 comments Download
M src/runtime/runtime.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime-internal.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M test/cctest/test-regexp.cc View 1 2 chunks +80 lines, -0 lines 0 comments Download
M test/mjsunit/es6/regexp-flags.js View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M test/webkit/fast/js/kde/RegExp-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/fast/regex/toString-expected.txt View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 23 (10 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/1543723002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1543723002/1
5 years ago (2015-12-21 23:32:10 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/9189)
5 years ago (2015-12-21 23:34:14 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1543723002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1543723002/20001
5 years ago (2015-12-21 23:41:01 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/13476)
5 years ago (2015-12-21 23:53:38 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1543723002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1543723002/40001
5 years ago (2015-12-22 00:24:23 UTC) #10
Dan Ehrenberg
5 years ago (2015-12-22 01:28:52 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-22 05:04:03 UTC) #14
Yang
lgtm. thanks. https://codereview.chromium.org/1543723002/diff/40001/src/js/regexp.js File src/js/regexp.js (right): https://codereview.chromium.org/1543723002/diff/40001/src/js/regexp.js#newcode503 src/js/regexp.js:503: const GlobalRegExpPrototype = new GlobalObject(); Regexp.js is ...
5 years ago (2015-12-22 06:31:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1543723002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1543723002/40001
5 years ago (2015-12-22 06:33:55 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
5 years ago (2015-12-22 06:35:29 UTC) #19
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/98f819c3e0c92d54a306cdacadda73cf96d21b52 Cr-Commit-Position: refs/heads/master@{#32997}
5 years ago (2015-12-22 06:36:24 UTC) #21
Dan Ehrenberg
https://codereview.chromium.org/1543723002/diff/40001/src/js/regexp.js File src/js/regexp.js (right): https://codereview.chromium.org/1543723002/diff/40001/src/js/regexp.js#newcode503 src/js/regexp.js:503: const GlobalRegExpPrototype = new GlobalObject(); On 2015/12/22 at 06:31:22, ...
5 years ago (2015-12-22 07:20:42 UTC) #22
Benedikt Meurer
5 years ago (2015-12-22 07:36:54 UTC) #23
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/1546493003/ by bmeurer@chromium.org.

The reason for reverting is: Breaks nosnap:
http://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20nosnap/builds....

Powered by Google App Engine
This is Rietveld 408576698