Bug 9495
| Summary: | Named inline functions can't be passed as arguments | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | yz <fick_el> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Major | ||
| Priority: | P2 | ||
| Version: | 420+ | ||
| Hardware: | All | ||
| OS: | OS X 10.4 | ||
yz
Safari fails with "Parse error" when passing named inline functions as arguments:
str.replace(/./g,function () { return "X"; }); // Will work well
str.replace(/./g,function rplc() { return "X"; }); // Will throw a Parse error exception
Needless to mention, this works well in any other modern browser, including IE, Firefox and Opera.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
This has been already fixed; you can verify the fix with a nightly build from <http://nightly.webkit.org>.
*** This bug has been marked as a duplicate of 4698 ***