WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 38602
Page::setCanStartMedia does not properly handle the case where a media listener is removed
https://bugs.webkit.org/show_bug.cgi?id=38602
Summary
Page::setCanStartMedia does not properly handle the case where a media listen...
Darin Adler
Reported
2010-05-05 12:35:26 PDT
Page::setCanStartMedia does not properly handle the case where a media listener is removed
Attachments
Patch
(1.35 KB, patch)
2010-05-05 12:40 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Patch
(2.11 KB, patch)
2010-05-05 13:13 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Improved version.
(2.10 KB, patch)
2010-05-05 16:10 PDT
,
Darin Adler
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2010-05-05 12:40:08 PDT
Created
attachment 55144
[details]
Patch
Darin Adler
Comment 2
2010-05-05 12:41:18 PDT
Comment on
attachment 55144
[details]
Patch Now the tricky part. I see this bug by code inspection, but I'm not sure how to make a test case. I did not mean to put this up for review. webkit-patch set the review? flag for me.
Adam Roben (:aroben)
Comment 3
2010-05-05 12:48:45 PDT
Comment on
attachment 55144
[details]
Patch
> @@ -422,8 +422,11 @@ void Page::setCanStartMedia(bool canStar > m_mediaCanStartListeners.clear(); > > size_t size = listeners.size(); > - for (size_t i = 0; i < size; ++i) > - listeners[i]->mediaCanStart(); > + for (size_t i = 0; i < size; ++i) { > + MediaCanStartListener* listener = listeners[i]; > + if (m_mediaCanStartListeners.contains(listener))'
Won't this test always fail, since line 422 cleared out m_mediaCanStartListeners?
Darin Adler
Comment 4
2010-05-05 12:50:48 PDT
(In reply to
comment #3
)
> (From update of
attachment 55144
[details]
) > > @@ -422,8 +422,11 @@ void Page::setCanStartMedia(bool canStar > > m_mediaCanStartListeners.clear(); > > > > size_t size = listeners.size(); > > - for (size_t i = 0; i < size; ++i) > > - listeners[i]->mediaCanStart(); > > + for (size_t i = 0; i < size; ++i) { > > + MediaCanStartListener* listener = listeners[i]; > > + if (m_mediaCanStartListeners.contains(listener))' > > Won't this test always fail, since line 422 cleared out > m_mediaCanStartListeners?
Yes, that's right. Need a bigger change.
Darin Adler
Comment 5
2010-05-05 13:13:08 PDT
Created
attachment 55147
[details]
Patch
Darin Adler
Comment 6
2010-05-05 16:10:21 PDT
Created
attachment 55168
[details]
Improved version.
Darin Adler
Comment 7
2010-05-06 10:12:44 PDT
Committed
r58894
: <
http://trac.webkit.org/changeset/58894
>
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