Bug 185595

Summary: Simplified Mach exception handling
Product: WebKit Reporter: Geoffrey Garen <ggaren>
Component: New BugsAssignee: Geoffrey Garen <ggaren>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, benjamin, cdumez, cmarcelo, dbates, ews-watchlist, keith_miller, mark.lam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch keith_miller: review+

Description Geoffrey Garen 2018-05-13 16:39:30 PDT
Simplified Mach exception handling
Comment 1 Geoffrey Garen 2018-05-13 16:55:17 PDT
Created attachment 340279 [details]
Patch
Comment 2 Alexey Proskuryakov 2018-05-13 19:07:53 PDT
Comment on attachment 340279 [details]
Patch

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

> Source/WTF/wtf/threads/Signals.cpp:86
> +            UNUSED_PARAM(source); // Silence the leaks tool.

How does this work?
Comment 3 Keith Miller 2018-05-14 00:05:29 PDT
Comment on attachment 340279 [details]
Patch

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

r=me with some comments.

> Source/WTF/wtf/threads/Signals.cpp:-89
> -        // We should never cancel our handler since it's a permanent thing so we don't add a cancel handler.

Why'd you remove this comment? I think it had useful information...

>> Source/WTF/wtf/threads/Signals.cpp:86
>> +            UNUSED_PARAM(source); // Silence the leaks tool.
> 
> How does this work?

The block will keep a reference to source if you use it inside the block. If we don't keep a pointer to it leaks thinks we leaked it even though the somewhere inside the mach code someone (I assume) is keeping it around.
Comment 4 Geoffrey Garen 2018-05-14 09:30:50 PDT
> > -        // We should never cancel our handler since it's a permanent thing so we don't add a cancel handler.
> 
> Why'd you remove this comment? I think it had useful information...

Sounded a bit tautological to me. I'll bring it back with an explanation.

> >> Source/WTF/wtf/threads/Signals.cpp:86
> >> +            UNUSED_PARAM(source); // Silence the leaks tool.
> > 
> > How does this work?

I'll expand this comment too.
Comment 5 Geoffrey Garen 2018-05-14 09:45:11 PDT
Committed r231760: <https://trac.webkit.org/changeset/231760>
Comment 6 Radar WebKit Bug Importer 2018-05-14 09:46:23 PDT
<rdar://problem/40220637>