New issue
Advanced search Search tips

Issue 641264 link

Starred by 3 users

Issue metadata

Status: Archived
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

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.
 
Components: -Blink Blink>JavaScript
Cc: jochen@chromium.org
Components: -Blink>JavaScript Blink>WindowDialog
Not V8 related and probably on purpose.
Project Member

Comment 3 by sheriffbot@chromium.org, Aug 29 2017

Status: Archived (was: Unconfirmed)
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
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