WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
115389
It should be an error to use adoptPtr with RefCounted subclasses
https://bugs.webkit.org/show_bug.cgi?id=115389
Summary
It should be an error to use adoptPtr with RefCounted subclasses
Anders Carlsson
Reported
2013-04-29 17:24:28 PDT
It should be an error to use adoptPtr with RefCounted subclasses
Attachments
Patch
(1.59 KB, patch)
2013-04-29 17:25 PDT
,
Anders Carlsson
benjamin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Anders Carlsson
Comment 1
2013-04-29 17:25:10 PDT
Created
attachment 200063
[details]
Patch
Benjamin Poulain
Comment 2
2013-04-29 17:34:53 PDT
Comment on
attachment 200063
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=200063&action=review
I loooove this. Great idea.
> Source/WTF/wtf/PassOwnPtr.h:151 > + COMPILE_ASSERT(!(IsSubclass<T, RefCounted<T> >::value), DoNotUseAdoptPtrWithRefCounted); > + COMPILE_ASSERT(!(IsSubclass<T, ThreadSafeRefCounted<T> >::value), DoNotUseAdoptPtrWithThreadSafeRefCounted);
+RefCountedBase
Anders Carlsson
Comment 3
2013-04-29 17:38:58 PDT
(In reply to
comment #2
)
> (From update of
attachment 200063
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=200063&action=review
> > I loooove this. Great idea. > > > Source/WTF/wtf/PassOwnPtr.h:151 > > + COMPILE_ASSERT(!(IsSubclass<T, RefCounted<T> >::value), DoNotUseAdoptPtrWithRefCounted); > > + COMPILE_ASSERT(!(IsSubclass<T, ThreadSafeRefCounted<T> >::value), DoNotUseAdoptPtrWithThreadSafeRefCounted); > > +RefCountedBase
I’ll use ThreadSafeRefCountedBase and RefCountedBase instead.
Anders Carlsson
Comment 4
2013-04-29 17:45:18 PDT
Committed
r149341
: <
http://trac.webkit.org/changeset/149341
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug