Bug 827913: remove no-longer-correct MOZ_ASSERT in getUserMedia r=derf

This commit is contained in:
Randell Jesup 2013-01-08 22:10:09 -05:00
Родитель 9bb826d9ee
Коммит d12b4b0cfb
2 изменённых файлов: 10 добавлений и 6 удалений

Просмотреть файл

@ -1068,7 +1068,9 @@ MediaManager::OnNavigation(uint64_t aWindowID)
for (uint32_t i = 0; i < length; i++) {
nsRefPtr<GetUserMediaCallbackMediaStreamListener> listener =
listeners->ElementAt(i);
listener->Invalidate();
if (listener->Stream()) { // aka HasBeenActivate()ed
listener->Invalidate();
}
listener->Remove();
}
listeners->Clear();
@ -1252,7 +1254,7 @@ void
GetUserMediaCallbackMediaStreamListener::NotifyFinished(MediaStreamGraph* aGraph)
{
mFinished = true;
Invalidate();
Invalidate(); // we know it's been activated
NS_DispatchToMainThread(new GetUserMediaListenerRemove(mWindowID, this));
}

Просмотреть файл

@ -104,7 +104,10 @@ public:
}
SourceMediaStream *GetSourceStream()
{
MOZ_ASSERT(mStream);
NS_ASSERTION(mStream,"Getting stream from never-activated GUMCMSListener");
if (!mStream) {
return nullptr;
}
return mStream->AsSourceStream();
}
@ -202,9 +205,8 @@ public:
SourceMediaStream *source = mListener->GetSourceStream();
// No locking between these is required as all the callbacks for the
// same MediaStream will occur on the same thread.
MOZ_ASSERT(source);
if (!source) // paranoia
return NS_ERROR_FAILURE;
if (!source) // means the stream was never Activated()
return NS_OK;
switch (mType) {
case MEDIA_START: