Commit 506fd617 authored by leviw@chromium.org's avatar leviw@chromium.org

Source/WebCore: Rolling out r139618. Appears to be causing sporadic crashes on Debug bots.

* Modules/mediastream/MediaStream.cpp:
(WebCore::processTrack):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::readyState):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:

LayoutTests: Speculatively rolling out r139618. Appears to be causing sporadic crashes on Debug bots.

* fast/mediastream/MediaStreamTrack-expected.txt:
* fast/mediastream/MediaStreamTrack.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4f63b038
2013-01-14 Levi Weintraub <leviw@chromium.org>
Speculatively rolling out r139618. Appears to be causing sporadic crashes on Debug bots.
* fast/mediastream/MediaStreamTrack-expected.txt:
* fast/mediastream/MediaStreamTrack.html:
2013-01-14 Dima Gorbik <dgorbik@apple.com>
Implement element type selectors for the WebVTT ::cue pseudo class
......@@ -4,13 +4,9 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
PASS getUserMedia succeeded.
PASS track.readyState is "live"
PASS Track onmute callback succeeded.
PASS track.readyState is "muted"
PASS Track onunmute callback succeeded.
PASS track.readyState is "live"
PASS Track onended callback succeeded.
PASS track.readyState is "ended"
PASS successfullyParsed is true
TEST COMPLETE
......
......@@ -34,24 +34,18 @@ function getUserMedia(constraints, callback) {
function onTrackEnded() {
testPassed('Track onended callback succeeded.');
shouldBeEqualToString('track.readyState', 'ended');
finishJSTest();
}
function onTrackUnmute() {
testPassed('Track onunmute callback succeeded.');
shouldBeEqualToString('track.readyState', 'live');
stream.stop();
}
function onTrackMute() {
testPassed('Track onmute callback succeeded.');
shouldBeEqualToString('track.readyState', 'muted');
track.enabled = true;
}
......@@ -61,8 +55,6 @@ function gotStream(s) {
stream = s;
track = stream.getVideoTracks()[0];
shouldBeEqualToString('track.readyState', 'live');
track.onunmute = onTrackUnmute;
track.onmute = onTrackMute;
track.onended = onTrackEnded;
......
2013-01-14 Levi Weintraub <leviw@chromium.org>
Rolling out r139618. Appears to be causing sporadic crashes on Debug bots.
* Modules/mediastream/MediaStream.cpp:
(WebCore::processTrack):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::readyState):
* Modules/mediastream/MediaStreamTrack.h:
* Modules/mediastream/MediaStreamTrack.idl:
2013-01-14 Levi Weintraub <leviw@chromium.org>
Rolling out r139678. This triggered a number of WebAudio crashes on Debug bots.
......@@ -48,7 +48,7 @@ static bool containsSource(MediaStreamSourceVector& sourceVector, MediaStreamSou
static void processTrack(MediaStreamTrack* track, MediaStreamSourceVector& sourceVector)
{
if (track->ended())
if (track->readyState() == MediaStreamTrack::ENDED)
return;
MediaStreamSource* source = track->component()->source();
......
......@@ -99,30 +99,24 @@ void MediaStreamTrack::setEnabled(bool enabled)
MediaStreamCenter::instance().didSetMediaStreamTrackEnabled(m_streamDescriptor.get(), m_component.get());
}
String MediaStreamTrack::readyState() const
MediaStreamTrack::ReadyState MediaStreamTrack::readyState() const
{
if (m_stopped)
return ASCIILiteral("ended");
return ENDED;
switch (m_component->source()->readyState()) {
case MediaStreamSource::ReadyStateLive:
return ASCIILiteral("live");
return LIVE;
case MediaStreamSource::ReadyStateMuted:
return ASCIILiteral("muted");
return MUTED;
case MediaStreamSource::ReadyStateEnded:
return ASCIILiteral("ended");
return ENDED;
}
ASSERT_NOT_REACHED();
return String();
return ENDED;
}
bool MediaStreamTrack::ended() const
{
return m_stopped || (m_component->source()->readyState() == MediaStreamSource::ReadyStateEnded);
}
void MediaStreamTrack::sourceChangedState()
{
if (m_stopped)
......
......@@ -43,6 +43,12 @@ class MediaStreamComponent;
class MediaStreamTrack : public RefCounted<MediaStreamTrack>, public ActiveDOMObject, public EventTarget, public MediaStreamSource::Observer {
public:
enum ReadyState {
LIVE = 0,
MUTED = 1,
ENDED = 2
};
static PassRefPtr<MediaStreamTrack> create(ScriptExecutionContext*, PassRefPtr<MediaStreamDescriptor>, MediaStreamComponent*);
virtual ~MediaStreamTrack();
......@@ -53,7 +59,7 @@ public:
bool enabled() const;
void setEnabled(bool);
String readyState() const;
ReadyState readyState() const;
DEFINE_ATTRIBUTE_EVENT_LISTENER(mute);
DEFINE_ATTRIBUTE_EVENT_LISTENER(unmute);
......@@ -61,7 +67,6 @@ public:
MediaStreamDescriptor* streamDescriptor();
MediaStreamComponent* component();
bool ended() const;
// EventTarget
virtual const AtomicString& interfaceName() const OVERRIDE;
......
......@@ -32,7 +32,10 @@
readonly attribute DOMString label;
attribute boolean enabled;
readonly attribute DOMString readyState;
const unsigned short LIVE = 0;
const unsigned short MUTED = 1;
const unsigned short ENDED = 2;
readonly attribute unsigned short readyState;
attribute EventListener onmute;
attribute EventListener onunmute;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment