Bug 17247 - Labelled continue/break can fail in some cases
Summary: Labelled continue/break can fail in some cases
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Darin Adler
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2008-02-08 15:03 PST by Oliver Hunt
Modified: 2008-02-08 17:14 PST (History)
3 users (show)

See Also:


Attachments
Testcase (395 bytes, text/html)
2008-02-08 15:06 PST, Oliver Hunt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-02-08 15:03:07 PST
JSC does not handle a continue or break to a label when there are multiple labels at that scope, eg.
	a: 
	b:
	for (var foo = 1; foo < 10; foo++) {
	   if (foo == 4)
		   continue a;
	   print("foo: "+foo);
	}
execution ends up terminating at foo: 3, rather than continuing to to foo: 9
Comment 1 Oliver Hunt 2008-02-08 15:06:19 PST
Created attachment 19009 [details]
Testcase

Uses setTimeout to trigger the script running as otherwise firefox does not run it for some reason
Comment 2 Mark Rowe (bdash) 2008-02-08 15:53:10 PST
<rdar://problem/5733160>
Comment 3 Darin Adler 2008-02-08 17:14:14 PST
Committed revision 30103.