Bug 177773 - NULL WeakPtr should not malloc!
Summary: NULL WeakPtr should not malloc!
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: 2017-10-02 13:42 PDT by Geoffrey Garen
Modified: 2017-10-02 15:21 PDT (History)
8 users (show)

See Also:


Attachments
Patch (2.59 KB, patch)
2017-10-02 13:54 PDT, Geoffrey Garen
koivisto: 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 2017-10-02 13:42:54 PDT
NULL WeakPtr should not malloc!
Comment 1 Geoffrey Garen 2017-10-02 13:54:22 PDT
Created attachment 322429 [details]
Patch
Comment 2 Build Bot 2017-10-02 13:57:27 PDT
Attachment 322429 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/WeakPtr.h:70:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Antti Koivisto 2017-10-02 14:17:17 PDT
Comment on attachment 322429 [details]
Patch

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

lol yes r=me

> Source/WTF/wtf/WeakPtr.h:70
> +    WeakPtr() { }
> +    WeakPtr(std::nullptr_t) { }
> +    WeakPtr(const WeakPtr& o) : m_ref(o.m_ref) { }

Should also add WeakPtr(WeakPtr&&) = default at some point (and operator= too).
Comment 4 Geoffrey Garen 2017-10-02 15:21:14 PDT
Committed r222752: <http://trac.webkit.org/changeset/222752>
Comment 5 Radar WebKit Bug Importer 2017-10-02 15:21:48 PDT
<rdar://problem/34778205>