Template strings retain value after page reloads when a ReferenceError occurs
Reported by
andreasl...@gmail.com,
Aug 26 2016
|
|||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Steps to reproduce the problem:
1. Create a file named foo.html with the following contents:
<script>
var name = 'test';
alert(`Hello ${name}`);
</script>
2. Open the page in Chrome, observe that an alert box with "Hello test" is displayed
3. Remove "var name = 'test';" from the file
4. Reload the page in Chrome.
What is the expected behavior?
A ReferenceError because the "name" variable isn't defined.
What went wrong?
An alert box with "Hello test" is displayed.
Did this work before? N/A
Chrome version: 52.0.2743.116 Channel: stable
OS Version: Ubuntu 16.4
Flash Version: Shockwave Flash 22.0 r0
It happens whether or not a hard reload (CTRL+Shift+R) is used, and keeps happening on subsequent reloads.
Tested with 52.0.2743.116 (Official Build) (64-bit) on Linux and Version 54.0.2839.0 canary (64-bit) on OSX.
,
Aug 29 2016
Not V8 related and probably on purpose.
,
Aug 29 2017
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 29 2017
This is still reproducible in 60.0.3112.90 hablich, I missed your comment the first time around. I don't understand how it could possibly be on purpose, though? What do you mean? A variable that persists across page loads? |
|||
►
Sign in to add a comment |
|||
Comment 1 by chrishtr@chromium.org
, Aug 26 2016