New issue
Advanced search Search tips

Issue 919261 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

/\n/.source === (new RegExp('\n')).source fails

Reported by oyas...@gmail.com, Jan 5

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce the problem:
1. In the js console, execute /\n/.source === (new RegExp('\n')).source

What is the expected behavior?
The js interpreter returns: true

What went wrong?
The js interpreter returns: false

Did this work before? N/A 

Chrome version: 71.0.3578.98  Channel: stable
OS Version: OS X 10.14.2
Flash Version: 

At least Safari and Firefox lack this issue.
 
Observed since at least Chrome 10.

Fixed by 4edfaa1f39ef6c51b28dd0c6c39ed42bcb0c76fd
"Reland "[regexp] Escape newlines when setting [[OriginalSource]]"
Landed in in 73.0.3654.0 via r619031

Components: -Blink Blink>JavaScript>Regexp
Labels: Needs-Triage-M71
Owner: jgruber@chromium.org
Status: Fixed (was: Unconfirmed)
I think this has been fixed.
Great! Verified fixed in Google Chrome Canary 73.0.3664.0, though broken in mainline Chrome 71.0.3578.98.

Sign in to add a comment