Title: [115649] trunk/Source/WebCore
Revision
115649
Author
tom...@google.com
Date
2012-04-30 10:44:38 -0700 (Mon, 30 Apr 2012)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115648 => 115649)


--- trunk/Source/WebCore/ChangeLog	2012-04-30 17:13:23 UTC (rev 115648)
+++ trunk/Source/WebCore/ChangeLog	2012-04-30 17:44:38 UTC (rev 115649)
@@ -1,3 +1,21 @@
+2012-04-30  Tommy Widenflycht  <tom...@google.com>
+
+        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):
+
 2012-04-28  Emil A Eklund  <e...@chromium.org> and Levi Weintraub  <le...@chromium.org>
 
         Add ENABLE_SUBPIXEL_LAYOUT controlling FractionalLayoutUnit denominator

Modified: trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.cpp (115648 => 115649)


--- trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.cpp	2012-04-30 17:13:23 UTC (rev 115648)
+++ trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.cpp	2012-04-30 17:44:38 UTC (rev 115649)
@@ -42,7 +42,6 @@
 
 LocalMediaStream::LocalMediaStream(ScriptExecutionContext* context, const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources)
     : MediaStream(context, MediaStreamDescriptor::create(createCanonicalUUIDString(), audioSources, videoSources))
-    , m_stopTimer(this, &LocalMediaStream::stopTimerFired)
 {
 }
 
@@ -53,14 +52,6 @@
 
 void LocalMediaStream::stop()
 {
-    if (!m_stopTimer.isActive())
-        m_stopTimer.startOneShot(0);
-}
-
-void LocalMediaStream::stopTimerFired(Timer<LocalMediaStream>* timer)
-{
-    ASSERT_UNUSED(timer, timer == &m_stopTimer);
-
     if (readyState() == ENDED)
         return;
 

Modified: trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.h (115648 => 115649)


--- trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.h	2012-04-30 17:13:23 UTC (rev 115648)
+++ trunk/Source/WebCore/Modules/mediastream/LocalMediaStream.h	2012-04-30 17:44:38 UTC (rev 115649)
@@ -29,7 +29,6 @@
 #if ENABLE(MEDIA_STREAM)
 
 #include "MediaStream.h"
-#include "Timer.h"
 
 namespace WebCore {
 
@@ -48,10 +47,6 @@
 
 private:
     LocalMediaStream(ScriptExecutionContext*, const MediaStreamSourceVector& audioSources, const MediaStreamSourceVector& videoSources);
-
-    void stopTimerFired(Timer<LocalMediaStream>*);
-
-    Timer<LocalMediaStream> m_stopTimer;
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to