Issue metadata
Sign in to add a comment
|
regular expression error in debug mode
Reported by
zzz...@gmail.com,
Aug 16 2016
|
||||||||||||||||||||||||
Issue description
Chrome Version : Version 54.0.2823.0
Other browsers tested: all will get a correct result except chromium
chrome: OK
Firefox: OK
IE: OK
What steps will reproduce the problem?
(1) write these codes in your web:
var re=/(b)/;
var str="abc";
re.test(str);
console.log(RegExp.$1);
(2) open this page in chromium and debug it
(3) make a breakpoint at the 3th line
(4) step over to the next line and to see the result of console.log
What is the expected result?
it should be "b" as in the normal mode.
What happens instead?
but actuallly it will get "" in debug mode.
Please provide any additional information below. Attach a screenshot if
possible.
,
Aug 18 2016
chromium not chrome
,
Aug 18 2016
,
Aug 19 2016
,
Aug 19 2016
Thanks for the report zzzgoo@. I'm able to reproduce on Mac 54.0.2832.2. Hovering shows "" while console.log prints the "b" correctly.
,
Sep 2 2016
RegExp.$1 is global variable it can be modified after any regexp usage. We use regexp to format output in console.log and this variable can be changed. I'm not able to reproduce it as is in current ToT but able to reproduce with other script: var re=/(b)/; var str="abc"; re.test(str); debugger; console.log(new Error(), RegExp.$1); console.log(RegExp.$1 === "b")
,
Oct 12 2017
This one would be fixed as soon as we migrate our injected-script-source to native. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by l446240525@gmail.com
, Aug 17 2016