GCLI: typing in a for loop causes an exception

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Developer Tools: Console
P2
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jorendorff, Assigned: jwalker)

Tracking

unspecified
Firefox 12
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
Steps to reproduce: Paste this into the new Web Console:

    { for (var x=0; x<9; x++) x;

Then hit enter.

Expected: I think the console output should be 8. That's what eval() would return for this snippet of code.

Observed: The console reports an XPCOM error, "invalid or illegal string was specified".
Summary: Console: typing in a for loop causes an exception → GCLI: typing in a for loop causes an exception
Assignee: nobody → jwalker
Blocks: 711051
Status: NEW → ASSIGNED
Depends on: 693269
Doing the same in Scratchpad and run the code does not echo anything - no exception - no result 

The code 
{ for (var x=0; x<9; x++) alert(x); 
echoes "x" value in the alert box, then throws the exception
Triage. Filter on PEGASUS.
Will be fixed in bug 693269
Priority: -- → P2
No longer blocks: 711051
(In reply to Maniac Vlad Florin (:vladmaniac) from comment #1)
> Doing the same in Scratchpad and run the code does not echo anything - no
> exception - no result 
> 
> The code 
> { for (var x=0; x<9; x++) alert(x); 
> echoes "x" value in the alert box, then throws the exception

Please file a separate bug if there's an issue in Scratchpad. That isn't really useful to this bug.
Fixed in Bug 693269.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
You need to log in before you can comment on or make changes to this bug.