Bug 154691

Summary: Should template RefCounter instead of RefCounter::Token
Product: WebKit Reporter: Gavin Barraclough <barraclough>
Component: Web Template FrameworkAssignee: Gavin Barraclough <barraclough>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix andersca: review+

Gavin Barraclough
Reported 2016-02-25 13:49:56 PST
My real goal here is to make the counter accurate. Currently returning a Token from token<>() results in ref-count churn. Fixing this either means changing the return value, or improving Token (which will probably mean replacing it with RefPtr). Either way would break the current type checking. Move type tag to RefCount so this can still be enforced.
Attachments
Fix (26.75 KB, patch)
2016-02-25 13:57 PST, Gavin Barraclough
andersca: review+
Gavin Barraclough
Comment 1 2016-02-25 13:57:24 PST
Anders Carlsson
Comment 2 2016-02-25 14:15:33 PST
Comment on attachment 272235 [details] Fix View in context: https://bugs.webkit.org/attachment.cgi?id=272235&action=review > Source/WTF/wtf/RefCounter.h:172 > +inline typename RefCounter<T>::Token& RefCounter<T>::Token::operator=(const RefCounter<T>::Token& token) I think this can be inline auto RefCounter<T>::Token::operator=(const RefCounter<T>::Token& token) -> Token&
Gavin Barraclough
Comment 3 2016-02-25 14:58:02 PST
Transmitting file data ................ Committed revision 197132.
Gavin Barraclough
Comment 4 2016-02-25 16:45:48 PST
Speculative windows fix: Transmitting file data .. Committed revision 197146.
Note You need to log in before you can comment on or make changes to this bug.