Eager evaluation doesn't properly check arguments at runtime (String.prototype.split)
Reported by
remysh...@gmail.com,
May 23 2018
|
|||
Issue description
UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3437.2 Safari/537.36
Steps to reproduce the problem:
In console with eager eval enabled, type:
1. "this is a phrase"
2. .split(' ')
3. { no response in eager eval }
Trying other examples, it seems to be String.prototype.split that won't return to eager eval
What is the expected behavior?
Should show an array of the results. I can't see that this is having side effects so I'd expect it to work.
What went wrong?
No result show.
Did this work before? N/A
Chrome version: 68.0.3437.2 Channel: n/a
OS Version: OS X 10.13.4
Flash Version:
,
May 25 2018
,
May 25 2018
Thanks for the report. In this case, Array.p.split can modify the argument passed if it is a regex: `string.split(regex); regex.lastMatch`. We'd need to update the side effect checker to deal with these argument cases and allow: `string.split(/abc/)` but not `string.split(regex)` when the latter might modify the `lastMatch`. |
|||
►
Sign in to add a comment |
|||
Comment 1 by sindhu.chelamcherla@chromium.org
, May 23 2018