Last Comment Bug 717622 - GCLI: typing in a for loop causes an exception
: GCLI: typing in a for loop causes an exception
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: unspecified
: x86 Mac OS X
: P2 normal (vote)
: Firefox 12
Assigned To: Joe Walker [:jwalker] (needinfo me or ping on irc)
:
: Brian Grinstead [:bgrins]
Mentors:
Depends on: 693269
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-12 08:29 PST by Jason Orendorff [:jorendorff]
Modified: 2012-01-28 12:53 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Jason Orendorff [:jorendorff] 2012-01-12 08:29:00 PST
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".
Comment 1 Maniac Vlad Florin (:vladmaniac) 2012-01-13 05:16:28 PST
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
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-13 09:17:30 PST
Triage. Filter on PEGASUS.
Will be fixed in bug 693269
Comment 3 Rob Campbell [:rc] (:robcee) 2012-01-16 07:40:13 PST
(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.
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2012-01-28 12:53:18 PST
Fixed in Bug 693269.

Note You need to log in before you can comment on or make changes to this bug.