RESOLVED WORKSFORME Bug 11609
Function.toString removes commas from the function body
https://bugs.webkit.org/show_bug.cgi?id=11609
Summary Function.toString removes commas from the function body
Bertrand Le Roy
Reported 2006-11-15 17:17:35 PST
function foo() { var e = {name: "value", type: Number, integer: true}; return e; } alert(foo.toString().indexOf(',')); Should show a positive integer, it shows -1. Seems to be fixed in the latest WebKit build but it's pretty bad as you can't eval a function's toString and get a working function.
Attachments
Alexey Proskuryakov
Comment 1 2006-11-15 22:27:33 PST
This works correctly in the latest WebKit indeed, and there is unfortunately nothing we can do to make vendors integrate the fix faster - one has to contact Apple, Omni and others separately for this :-(.
Bertrand Le Roy
Comment 2 2006-11-15 22:51:21 PST
Yes, well, I filed this mainly for it to be documented, in case someone else hits the problem. As far as I'm concerned it's ok if it's not fixed for the current Safari: it doesn't block any important feature on our side. Thanks for looking into it.
Note You need to log in before you can comment on or make changes to this bug.