Bug 42560

Summary: Web Inspector: show stack trace for uncaught exceptions
Product: WebKit Reporter: Yury Semikhatsky <yurys>
Component: Web Inspector (Deprecated)Assignee: Yury Semikhatsky <yurys>
Status: RESOLVED FIXED    
Severity: Normal CC: bweinstein, joepeck, keishi, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Yury Semikhatsky 2010-07-19 05:55:47 PDT
If you throw an exception in your javascript, the web inspector console just 
prints out the description of the extension and doesn't give the stack trace.  
This is particularly unhelpful if the exception is being thrown in a library 
many levels removed from the source of the error in your code.
Comment 1 Yury Semikhatsky 2010-07-19 06:05:14 PDT
Created attachment 61943 [details]
Patch
Comment 2 Pavel Feldman 2010-07-19 08:06:44 PDT
Comment on attachment 61943 [details]
Patch

It looks correct, however, I think we've reached the critical mass of mess in the code. Can we refactor it to make prettier?

My concern is that ScriptCallStack means two different things in different call paths: 
(1) it is used as a top frame + script state for console.log/dir/etc
(2) it is used as a stack container with no access to top frame arguments in regular console messages
Comment 3 Yury Semikhatsky 2010-07-19 08:12:19 PDT
(In reply to comment #2)
> (From update of attachment 61943 [details])
> It looks correct, however, I think we've reached the critical mass of mess in the code. Can we refactor it to make prettier?
> 
> My concern is that ScriptCallStack means two different things in different call paths: 
> (1) it is used as a top frame + script state for console.log/dir/etc
> (2) it is used as a stack container with no access to top frame arguments in regular console messages

Filed a bug for this: https://bugs.webkit.org/show_bug.cgi?id=42570
Comment 4 Yury Semikhatsky 2010-07-19 08:20:12 PDT
Comment on attachment 61943 [details]
Patch

Clearing flags on attachment: 61943

Committed r63662: <http://trac.webkit.org/changeset/63662>
Comment 5 Yury Semikhatsky 2010-07-19 08:20:22 PDT
All reviewed patches have been landed.  Closing bug.