Bug 11609 - Function.toString removes commas from the function body
Summary: Function.toString removes commas from the function body
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 419.x
Hardware: PC OS X 10.4
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2006-11-15 17:17 PST by Bertrand Le Roy
Modified: 2006-11-15 22:51 PST (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Le Roy 2006-11-15 17:17:35 PST
function foo() {
  var e = {name: "value", type: Number, integer: true};
  return e;


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.
Comment 1 Alexey Proskuryakov 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 :-(.
Comment 2 Bertrand Le Roy 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.