New issue
Advanced search Search tips

Issue 858844 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Calling a function containing a for-of over a non-iterable value twice produces 2 different error messages

Reported by dfshep...@gmail.com, Jun 28 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

Steps to reproduce the problem:
1. Execute this code:
```js
function f() {for (b of null);};
for (i = 3; i--;) setTimeout(f);
```
2. Observe the error messages logged in console.
3. The first message will be `Uncaught TypeError: null is not iterable`, but the second (and third, and so-on) will be `Uncaught TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null`.

What is the expected behavior?
The same error message should be returned for the same error message every time.

What went wrong?
A different error message is produced only for the first time an erroneous function is called. Further calls produce the other error message.

Did this work before? N/A 

Chrome version: 67.0.3396.99  Channel: stable
OS Version: 10.0
Flash Version: 

This is really minor, since there's nothing functionally wrong, but it did strike me as important enough to report, because it caused me to have to re-investigate several dozen lines of code due to believing I must be mutating state unintentionally somewhere to cause the same code to produce 2 different error messages.
 
Labels: Needs-Triage-M67
Components: -Blink Blink>JavaScript
Labels: Triaged-ET Needs-Feedback
Tried to reproduce the issue on reported version 67.0.3396.99. on Windows 10

Executed the above function on DevTools -> console,  and everytime we run this code,the error messages as `Uncaught TypeError: null is not iterable` and `Uncaught TypeError: Cannot read property 'Symbol(Symbol.iterator)' of null`  are coming up.
Attached screenshot for reference. 

Reporter@ Can you please check and confirm if this is the issue seen. 

Thanks !
858844.PNG
436 KB View Download
I am indeed seeing the same issue. I should have been more clear that this seems to be on a per-function basis, and effectively resets when you re-declare function f.

I've attached a screenshot showing the same pattern.
notIterableSymbolIteratorBug.png
160 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, Jul 6

Cc: swarnasree.mukkala@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Bisect
Status: Untriaged (was: Unconfirmed)
Labels: -Needs-Bisect M-69 Target-69 FoundIn-69
As per comment#3 able to reproduce issue on reported version #67.0.3396.99 and on #60.0.3072.0(M-60) also.This is a non-regression issue as it is observed from M60 old builds.
Attached screenshot for reference.

Removing Needs-Bisect label as the issue is seen from M-60. Please feel free to add Needs-Bisect label if you need further bisect information from our end.

Thanks...!!
858844.PNG
309 KB View Download
Cc: yangguo@chromium.org
Components: -Blink>JavaScript Blink>JavaScript>Language
Status: Available (was: Untriaged)
Components: -Blink>JavaScript>Language Blink>JavaScript>Runtime

Sign in to add a comment