WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
59466
Incorrect OwnPtr usage in MediaPlayer
https://bugs.webkit.org/show_bug.cgi?id=59466
Summary
Incorrect OwnPtr usage in MediaPlayer
Adrienne Walker
Reported
2011-04-26 10:21:38 PDT
As part of the work to remove the LOOSE_OWN_PTR #define in OwnPtr.h, I was looking at Source/WebCore/platform/graphics/MediaPlayer* and saw this: OwnPtr<MediaPlayerPrivateInterface*> m_private; It seems to be an error to me to store a raw pointer in an OwnPtr and that this really was intended to be OwnPtr<MediaPlayerPrivateInterface>. I don't know if it's possible, but it'd also probably be nice to change the CreateMediaEnginePlayer interface to return a PassOwnPtr<MediaPlayerPrivateInterface> too.
Attachments
Patch
(17.83 KB, patch)
2011-05-11 16:45 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Patch
(20.61 KB, patch)
2011-05-11 18:00 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Patch
(21.23 KB, patch)
2011-05-12 15:16 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2011-05-11 16:45:50 PDT
Created
attachment 93213
[details]
Patch
Adam Barth
Comment 2
2011-05-11 16:53:27 PDT
Comment on
attachment 93213
[details]
Patch Fantastic. Thanks!
WebKit Review Bot
Comment 3
2011-05-11 17:07:13 PDT
Comment on
attachment 93213
[details]
Patch
Attachment 93213
[details]
did not pass chromium-ews (chromium-xvfb): Output:
http://queues.webkit.org/results/8690451
Adrienne Walker
Comment 4
2011-05-11 17:23:34 PDT
In retrospect, I was confused about OwnPtr<T*> which turns out to be exactly equivalent to OwnPtr<T> thanks to template magic. Its only sin is that it's stylistically confusing. The only bit of this patch that really needs to be there is to just remove the LOOSE_OWN_PTR #define and fix the few lines that break because of it. Changing the CreateMediaEnginePlayer interface is probably not necessary.
Patrick R. Gansterer
Comment 5
2011-05-11 17:25:36 PDT
(In reply to
comment #4
)
> The only bit of this patch that really needs to be there is to just remove the LOOSE_OWN_PTR #define and fix the few lines that break because of it. Changing the CreateMediaEnginePlayer interface is probably not necessary.
adoptPtr should be done directly when calling new, so we need to change CreateMediaEnginePlayer too.
Patrick R. Gansterer
Comment 6
2011-05-11 18:00:39 PDT
Created
attachment 93227
[details]
Patch
WebKit Review Bot
Comment 7
2011-05-11 19:42:57 PDT
Comment on
attachment 93227
[details]
Patch
Attachment 93227
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/8685589
Gustavo Noronha (kov)
Comment 8
2011-05-12 11:08:47 PDT
Comment on
attachment 93227
[details]
Patch
Attachment 93227
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/8688764
Patrick R. Gansterer
Comment 9
2011-05-12 15:16:26 PDT
Created
attachment 93355
[details]
Patch
WebKit Commit Bot
Comment 10
2011-05-13 00:36:34 PDT
The commit-queue encountered the following flaky tests while processing
attachment 93355
[details]
: inspector/debugger/debugger-scripts.html
bug 59921
(authors:
pfeldman@chromium.org
and
podivilov@chromium.org
) The commit-queue is continuing to process your patch.
WebKit Commit Bot
Comment 11
2011-05-13 00:38:01 PDT
Comment on
attachment 93355
[details]
Patch Clearing flags on attachment: 93355 Committed
r86418
: <
http://trac.webkit.org/changeset/86418
>
WebKit Commit Bot
Comment 12
2011-05-13 00:38:07 PDT
All reviewed patches have been landed. Closing bug.
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