Summary: | WeakPtr should have a move constructor | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Geoffrey Garen <ggaren> | ||||||||
Component: | New Bugs | Assignee: | Geoffrey Garen <ggaren> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | benjamin, buildbot, cdumez, cmarcelo, commit-queue, dbates, koivisto, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Geoffrey Garen
2017-10-02 15:26:48 PDT
Created attachment 322457 [details]
Patch
Comment on attachment 322457 [details]
Patch
ofc
Comment on attachment 322457 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322457&action=review > Source/WTF/wtf/WeakPtr.h:77 > + WeakPtr& operator=(const WeakPtr&) = default; No WeakPtr& operator=(const WeakPtr&&) = default; ? Comment on attachment 322457 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322457&action=review > Source/WTF/wtf/WeakPtr.h:70 > WeakPtr(const WeakPtr& o) : m_ref(o.m_ref) { } Can this one be = default; as well? Created attachment 322464 [details]
Patch
Comment on attachment 322464 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322464&action=review I think that if we just drop the custom copy constructor / assignment operator then we'd get implicit move constructor / assignment operators, no? > Source/WTF/wtf/WeakPtr.h:77 > + WeakPtr& operator=(const WeakPtr&) = default; Why don't we want the WeakPtr& operator=(const WeakPtr&&) = default; too? Comment on attachment 322464 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322464&action=review > Source/WTF/ChangeLog:3 > + WeakPtr should have a move constructor It would be good to API-test this change. Created attachment 322473 [details]
Patch
Comment on attachment 322473 [details]
Patch
r=me
Comment on attachment 322473 [details] Patch Clearing flags on attachment: 322473 Committed r222764: <http://trac.webkit.org/changeset/222764> All reviewed patches have been landed. Closing bug. |