Changeset 115649 in webkit


Ignore:
Timestamp:
Apr 30, 2012 10:44:38 AM (12 years ago)
Author:
tommyw@google.com
Message:

MediaStream API: Change LocalMediaStream::stop to be synchronous
https://bugs.webkit.org/show_bug.cgi?id=84942

Reviewed by Dimitri Glazkov.

Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
behaviour needs to change since it is no longer a good idea to start a timer when called.

Not possible to write a test for this.

  • Modules/mediastream/LocalMediaStream.cpp:

(WebCore::LocalMediaStream::LocalMediaStream):
(WebCore::LocalMediaStream::stop):

  • Modules/mediastream/LocalMediaStream.h:

(LocalMediaStream):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r115647 r115649  
     12012-04-30  Tommy Widenflycht  <tommyw@google.com>
     2
     3        MediaStream API: Change LocalMediaStream::stop to be synchronous
     4        https://bugs.webkit.org/show_bug.cgi?id=84942
     5
     6        Reviewed by Dimitri Glazkov.
     7
     8        Since I changed LocalMediaStream to be a ActiveDOMObject recently the stop()
     9        behaviour needs to change since it is no longer a good idea to start a timer when called.
     10
     11        Not possible to write a test for this.
     12
     13        * Modules/mediastream/LocalMediaStream.cpp:
     14        (WebCore::LocalMediaStream::LocalMediaStream):
     15        (WebCore::LocalMediaStream::stop):
     16        * Modules/mediastream/LocalMediaStream.h:
     17        (LocalMediaStream):
     18
    1192012-04-28  Emil A Eklund  <eae@chromium.org> and Levi Weintraub  <leviw@chromium.org>
    220
  • trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.cpp

    r113460 r115649  
    4343LocalMediaStream::LocalMediaStream(ScriptExecutionContext* context, const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources)
    4444    : MediaStream(context, MediaStreamDescriptor::create(createCanonicalUUIDString(), audioSources, videoSources))
    45     , m_stopTimer(this, &LocalMediaStream::stopTimerFired)
    4645{
    4746}
     
    5453void LocalMediaStream::stop()
    5554{
    56     if (!m_stopTimer.isActive())
    57         m_stopTimer.startOneShot(0);
    58 }
    59 
    60 void LocalMediaStream::stopTimerFired(Timer<LocalMediaStream>* timer)
    61 {
    62     ASSERT_UNUSED(timer, timer == &m_stopTimer);
    63 
    6455    if (readyState() == ENDED)
    6556        return;
  • trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.h

    r113460 r115649  
    3030
    3131#include "MediaStream.h"
    32 #include "Timer.h"
    3332
    3433namespace WebCore {
     
    4948private:
    5049    LocalMediaStream(ScriptExecutionContext*, const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources);
    51 
    52     void stopTimerFired(Timer<LocalMediaStream>*);
    53 
    54     Timer<LocalMediaStream> m_stopTimer;
    5550};
    5651
Note: See TracChangeset for help on using the changeset viewer.