RESOLVED FIXED 10880
Do..while loop gains a semicolon each time it is toStringed
https://bugs.webkit.org/show_bug.cgi?id=10880
Summary Do..while loop gains a semicolon each time it is toStringed
Jesse Ruderman
Reported 2006-09-15 23:25:07 PDT
javascript:f=function(){do{}while(0)}; for(i=0;i<4;++i) { alert(f); f=eval("(" + f + ")"); }
Attachments
Avoid new semicolon when toString()ing function which has do..while (3.78 KB, patch)
2007-05-08 11:20 PDT, Kimmo Kinnunen
darin: review+
Eric Seidel (no email)
Comment 1 2007-05-08 02:45:26 PDT
Although no website would ever care about this, this totally breaks jruderman's testing tool since so many of the generated tests seem to contain do {} while
Kimmo Kinnunen
Comment 2 2007-05-08 11:20:04 PDT
Created attachment 14416 [details] Avoid new semicolon when toString()ing function which has do..while EmptyStatement got created after every do..while();, because ';' was not consumed as part of the do..while.
Darin Adler
Comment 3 2007-05-08 11:53:30 PDT
Comment on attachment 14416 [details] Avoid new semicolon when toString()ing function which has do..while Nice! r=me
David Kilzer (:ddkilzer)
Comment 4 2007-05-08 13:46:55 PDT
(In reply to comment #3) > (From update of attachment 14416 [details] [edit]) > Nice! r=me Please avoid using tabs in ChangeLog entries in the future. Thanks!
Eric Seidel (no email)
Comment 5 2007-05-08 20:33:32 PDT
Need a changelog for layouttests next time too. Commited as 21320
Note You need to log in before you can comment on or make changes to this bug.