WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
123350
[MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
https://bugs.webkit.org/show_bug.cgi?id=123350
Summary
[MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
Jer Noble
Reported
2013-10-25 11:37:41 PDT
[MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
Attachments
Patch
(14.15 KB, patch)
2013-10-25 11:39 PDT
,
Jer Noble
darin
: review+
Details
Formatted Diff
Diff
Patch for landing.
(15.73 KB, patch)
2013-10-25 16:19 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2013-10-25 11:39:40 PDT
Created
attachment 215194
[details]
Patch
Darin Adler
Comment 2
2013-10-25 12:48:10 PDT
Comment on
attachment 215194
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=215194&action=review
> Source/WebCore/Modules/mediasource/SourceBuffer.h:54 > + static PassRefPtr<SourceBuffer> create(PassRefPtr<SourceBufferPrivate>, MediaSource*);
Since this argument can never be null, it should be PassRef instead of PassRefPtr.
> Source/WebCore/Modules/mediasource/SourceBuffer.h:87 > + SourceBuffer(PassRefPtr<SourceBufferPrivate>, MediaSource*);
Since this argument can never be null, it should be PassRef instead of PassRefPtr.
> Source/WebCore/Modules/mediasource/WebKitSourceBuffer.h:50 > + static RefPtr<WebKitSourceBuffer> create(PassRefPtr<SourceBufferPrivate>, PassRefPtr<WebKitMediaSource>);
Since this argument can never be null, it should be PassRef instead of PassRefPtr. Since the result of this function can never be null, it could be PassRef instead of RefPtr.
> Source/WebCore/html/HTMLMediaSource.h:56 > + virtual void setPrivateAndOpen(PassRefPtr<MediaSourcePrivate>) = 0;
Since this argument can never be null, it should be PassRef instead of PassRefPtr.
> Source/WebCore/platform/graphics/SourceBufferPrivate.h:51 > +protected: > + SourceBufferPrivate() { }
This isn’t needed and can just be omitted. Since there are already pure virtual functions in this class, nobody can create an instance by calling the constructor except for a derived class, so the constructor is already effectively protected. And an empty constructor need not be written explicitly except to make it protected. So I suggest you just leave this out.
Jer Noble
Comment 3
2013-10-25 13:10:17 PDT
(In reply to
comment #2
)
> (From update of
attachment 215194
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=215194&action=review
> > > Source/WebCore/Modules/mediasource/SourceBuffer.h:54 > > + static PassRefPtr<SourceBuffer> create(PassRefPtr<SourceBufferPrivate>, MediaSource*); > > Since this argument can never be null, it should be PassRef instead of PassRefPtr.
Ahh, PassRef is brand new! I'll change all of the instances of PassRefPtr to PassRef.
> > Source/WebCore/platform/graphics/SourceBufferPrivate.h:51 > > +protected: > > + SourceBufferPrivate() { } > > This isn’t needed and can just be omitted. Since there are already pure virtual functions in this class, nobody can create an instance by calling the constructor except for a derived class, so the constructor is already effectively protected. And an empty constructor need not be written explicitly except to make it protected. So I suggest you just leave this out.
Good point. I'll remove this.
Jer Noble
Comment 4
2013-10-25 16:19:32 PDT
Created
attachment 215227
[details]
Patch for landing.
Jer Noble
Comment 5
2013-10-30 08:52:30 PDT
Committed
r158270
: <
http://trac.webkit.org/changeset/158270
>
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