Bug 93880

Summary: [Qt] Clean up exception handling
Product: WebKit Reporter: Simon Hausmann <hausmann>
Component: New BugsAssignee: Simon Hausmann <hausmann>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarcelo, kenneth
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60842    
Attachments:
Description Flags
Patch kenneth: review+

Description Simon Hausmann 2012-08-13 12:18:11 PDT
[Qt] Clean up exception handling
Comment 1 Simon Hausmann 2012-08-13 12:22:14 PDT
Created attachment 158070 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-08-13 12:25:48 PDT
Comment on attachment 158070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=158070&action=review

> Source/WebCore/ChangeLog:10
> +        was thrown. Naturally the caller must store that ValueRef on the stack in order to get caught
> +        by the garbage collector, otherwise the callee would have to use JSValueProtect on it.

you want it to be garbage collected?
Comment 3 Simon Hausmann 2012-08-13 12:28:22 PDT
(In reply to comment #2)
> (From update of attachment 158070 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=158070&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        was thrown. Naturally the caller must store that ValueRef on the stack in order to get caught
> > +        by the garbage collector, otherwise the callee would have to use JSValueProtect on it.
> 
> you want it to be garbage collected?

No :) caught in the sense of _marked_ so that the GC does not delete it on the heap.
Comment 4 Kenneth Rohde Christiansen 2012-08-13 12:29:58 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 158070 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=158070&action=review
> > 
> > > Source/WebCore/ChangeLog:10
> > > +        was thrown. Naturally the caller must store that ValueRef on the stack in order to get caught
> > > +        by the garbage collector, otherwise the callee would have to use JSValueProtect on it.
> > 
> > you want it to be garbage collected?
> 
> No :) caught in the sense of _marked_ so that the GC does not delete it on the heap.

I guessed so, maybe that could be rewritten to be more clear for non JS guys like me.
Comment 5 Simon Hausmann 2012-08-13 12:33:13 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > (From update of attachment 158070 [details] [details] [details])
> > > View in context: https://bugs.webkit.org/attachment.cgi?id=158070&action=review
> > > 
> > > > Source/WebCore/ChangeLog:10
> > > > +        was thrown. Naturally the caller must store that ValueRef on the stack in order to get caught
> > > > +        by the garbage collector, otherwise the callee would have to use JSValueProtect on it.
> > > 
> > > you want it to be garbage collected?
> > 
> > No :) caught in the sense of _marked_ so that the GC does not delete it on the heap.
> 
> I guessed so, maybe that could be rewritten to be more clear for non JS guys like me.

Good point, will do :)
Comment 6 Caio Marcelo de Oliveira Filho 2012-08-13 13:08:47 PDT
LGTM.
Comment 7 Simon Hausmann 2012-08-13 13:13:23 PDT
Committed r125439: <http://trac.webkit.org/changeset/125439>