GCLI: typing in a for loop causes an exception

RESOLVED FIXED in Firefox 12

Status

defect
P2
normal
RESOLVED FIXED
8 years ago
Last year

People

(Reporter: jorendorff, Assigned: jwalker)

Tracking

unspecified
Firefox 12
x86
macOS
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

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: GCLI-12
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: GCLI-12
(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
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.