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

Issue 1847783003: Revert of Remove RegExp.prototype.source getter compat workaround (Closed)

Created:
4 years, 8 months ago by Dan Ehrenberg
Modified:
4 years, 8 months ago
Reviewers:
adamk
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

Revert of Remove RegExp.prototype.source getter compat workaround (patchset #2 id:20001 of https://codereview.chromium.org/1837843002/ ) Reason for revert: TC39 decided that this compatibility fix should be standardized. Original issue's description: > Remove RegExp.prototype.source getter compat workaround > > The getter RegExp.prototype.source is specified in ES2015 to throw when > called on a non-RegExp instance, such as RegExp.prototype. We had previously > put in a compatibility workaround for all RegExp getters to make them > throw on access specifically with RegExp.prototype as the receiver; however, > we only have evidence that this is needed for properties other than source. > This patch removes the compatibility workaround for get RegExp.prototype.source > and gives it semantics precisely as per the ES2015 specification. > > R=adamk > BUG=chromium:581577, v8:4827 > LOG=Y > > Committed: https://crrev.com/80803aa89e31839b8f73959776fa7e1923c6b461 > Cr-Commit-Position: refs/heads/master@{#35086} R=adamk@chromium.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=chromium:581577, v8:4827 LOG=Y Committed: https://crrev.com/31e806ebd1a33f6c9207f6d3aed7bbdf3bb72cf7 Cr-Commit-Position: refs/heads/master@{#35180}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -6 lines) Patch
M src/js/regexp.js View 1 chunk +5 lines, -0 lines 0 comments Download
M test/mjsunit/es6/regexp-flags.js View 1 chunk +1 line, -5 lines 0 comments Download
M test/test262/test262.status View 1 chunk +1 line, -0 lines 0 comments Download
M test/webkit/fast/regex/toString-expected.txt View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (6 generated)
Dan Ehrenberg
Created Revert of Remove RegExp.prototype.source getter compat workaround
4 years, 8 months ago (2016-03-31 17:23:54 UTC) #1
adamk
lgtm
4 years, 8 months ago (2016-03-31 17:24:28 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847783003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847783003/1
4 years, 8 months ago (2016-03-31 17:25:43 UTC) #5
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/13076)
4 years, 8 months ago (2016-03-31 17:32:36 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1847783003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1847783003/1
4 years, 8 months ago (2016-03-31 23:09:47 UTC) #10
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 8 months ago (2016-04-01 00:37:06 UTC) #11
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/31e806ebd1a33f6c9207f6d3aed7bbdf3bb72cf7 Cr-Commit-Position: refs/heads/master@{#35180}
4 years, 8 months ago (2016-04-01 00:37:35 UTC) #13
Dan Ehrenberg
4 years, 8 months ago (2016-04-01 15:18:21 UTC) #14
Message was sent while issue was closed.
On 2016/04/01 at 00:37:35, commit-bot wrote:
> Patchset 1 (id:??) landed as
https://crrev.com/31e806ebd1a33f6c9207f6d3aed7bbdf3bb72cf7
> Cr-Commit-Position: refs/heads/master@{#35180}

Looks like this revert happened because the logic for saving built-ins in
extensions (in src/extensions/renderer/safe_builtins.cc) saved
RegExp.prototype.test, but then was disturbed by a mutation to
RegExp.prototype.exec. This could be fixed by basically implementing
$RegExp.test in terms of the initial RegExp.prototype.exec value (toJSON already
goes through far more work), or simply exposing exec and replacing the single
usage.

Powered by Google App Engine
This is Rietveld 408576698