Bug 185595 - Simplified Mach exception handling
Summary: Simplified Mach exception handling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-13 16:39 PDT by Geoffrey Garen
Modified: 2018-05-14 09:46 PDT (History)
9 users (show)

See Also:


Attachments
Patch (4.27 KB, patch)
2018-05-13 16:55 PDT, Geoffrey Garen
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>