Bug 79548

Summary: Error.stack includes newlines after function names
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: barraclough, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Timothy Hatcher
Reported 2012-02-24 18:02:41 PST
Error.stack seems to include a newline after function names. ["myStackTrace ", "bar ", "foo ", "eval code", "eval@[native code]"] It shouldn't.
Attachments
Gavin Barraclough
Comment 1 2012-03-11 15:47:00 PDT
Hi Tim, Error.stack is no longer an array, and is now just a string. As such, I think the newlines are now necessary to separate the functions, and to get the stack as a array without newlines you just need to use .stack.split('\n'). Does this seem good to you, or are you hoping for a different interface? - if it's good as is, let's close this bug. cheers, G.
Timothy Hatcher
Comment 2 2012-03-11 15:50:48 PDT
Ugly, but it is fine. (I know this is for compatability reasons.)
Note You need to log in before you can comment on or make changes to this bug.