Bug 194694 - [bmalloc] NSBundle-based application name check should be executed after debug-heap environment variable check
Summary: [bmalloc] NSBundle-based application name check should be executed after debu...
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: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-15 00:41 PST by Yusuke Suzuki
Modified: 2019-02-15 01:12 PST (History)
2 users (show)

See Also:


Attachments
Patch (1.97 KB, patch)
2019-02-15 00:48 PST, Yusuke Suzuki
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2019-02-15 00:41:56 PST
[bmalloc] NSBundle-based application name check should be executed after debug-heap environment variable check
Comment 1 Yusuke Suzuki 2019-02-15 00:48:54 PST
Created attachment 362103 [details]
Patch
Comment 2 Mark Lam 2019-02-15 01:03:29 PST
Comment on attachment 362103 [details]
Patch

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

r=me with suggested improvement.

> Source/bmalloc/bmalloc/Gigacage.cpp:271
>              bool result = !PerProcess<Environment>::get()->isDebugHeapEnabled();
>              if (!result)

This is not related to your patch but since you're in this code, let's fix this too:
1. the name "result" is not meaningful.  Let's call it debugHeapEnabled instead.
2. the double negative is hard to follow.  Let's not negate the result of PerProcess<Environment>::get()->isDebugHeapEnabled(), and let's not negate the boolean value in the if check.
Comment 3 Yusuke Suzuki 2019-02-15 01:06:07 PST
Comment on attachment 362103 [details]
Patch

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

>> Source/bmalloc/bmalloc/Gigacage.cpp:271
>>              if (!result)
> 
> This is not related to your patch but since you're in this code, let's fix this too:
> 1. the name "result" is not meaningful.  Let's call it debugHeapEnabled instead.
> 2. the double negative is hard to follow.  Let's not negate the result of PerProcess<Environment>::get()->isDebugHeapEnabled(), and let's not negate the boolean value in the if check.

Sounds nice! Fixed.
Comment 4 Yusuke Suzuki 2019-02-15 01:10:05 PST
Committed r241581: <https://trac.webkit.org/changeset/241581>
Comment 5 Radar WebKit Bug Importer 2019-02-15 01:12:14 PST
<rdar://problem/48104501>