Bug 18990 - SquirrelFish: Function.toString loses new lines
Summary: SquirrelFish: Function.toString loses new lines
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-10 20:06 PDT by Oliver Hunt
Modified: 2009-03-19 22:50 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-05-10 20:06:18 PDT
Regardless of formatting Function.toString now appears to actively strip formatting, try

createPkg=function(_1){
var _2=_1.split("."),len=_2.length;
var _3=this.global;
for(var i=0;i<len-1&&_3&&_2[i];i++){
_3=(_3[_2[i]])?_3[_2[i]]:_3[_2[i]]={};
}
return {pkg:_3,className:(len>0)?_2[len-1]:""};
};

in the inspector, and cry at the out put.
Comment 1 Alexey Proskuryakov 2009-03-19 08:33:23 PDT
Bug 24350 is a compatibility regression caused by this.
Comment 2 Cameron Zwarich (cpst) 2009-03-19 17:24:47 PDT
I assigned bug 24350 to myself, but I may not fix it by fixing this bug, so I won't assign this one to myself.
Comment 3 Geoffrey Garen 2009-03-19 19:04:45 PDT
I talked to Oliver on IRC.

He said this bug was about newlines being stripped from the function. He said it seems to have been an Inspector bug, which was resolved.

Bug 24350 and the issue of pretty printing are separate. Maybe we need another bug to cover the pretty printing feature.