I've been trying out some of the plugin layout tests, and have noticed that these two have invalid js: plugins\mouse-events.html plugins\open-and-close-window-with-plugin.html The problem is that there's a return statement that's not in a function. Only KJS seems to handle this fine, Firefox/IE choke. I'll attach a reduced test case. ECMA-262, section 12.9, page 67 states that an EMCAScript program is considered syntactically incorrect if it contains a return statement that is not within the body of a function.
Created attachment 16269 [details] Reduced test case of invalid return statement This prints FAIL in Firefox/IE, but PASS in Safari.
Created attachment 16270 [details] Take out the invalid return statements.
Comment on attachment 16270 [details] Take out the invalid return statements. The flag to set to ask for review is "?", not "+". A "+" is set by a reviewer. This patch looks great. Just needs a change log.
Created attachment 16271 [details] Patch with ChangeLog
ah, thanks, I missed that part. Added another patch with the change log.
Comment on attachment 16271 [details] Patch with ChangeLog Looks good, r=me.
Can we get a bug filed about accepting "return" outside of functions?
(In reply to comment #7) > Can we get a bug filed about accepting "return" outside of functions? Bug 15200.
Committed revision 25531.