Bug 891706 - Crash in mozilla::dom::MediaRecorder::CheckPrincipal() when closing a tab while recording is started. r=roc

This commit is contained in:
Randy Lin 2013-07-10 12:52:29 +08:00
parent 55a463e643
commit e18446fcd0

View File

@ -355,6 +355,8 @@ MediaRecorder::NotifyError(nsresult aRv)
bool MediaRecorder::CheckPrincipal()
{
nsCOMPtr<nsIPrincipal> principal = mStream->GetPrincipal();
if (!GetOwner())
return false;
nsCOMPtr<nsIDocument> doc = GetOwner()->GetExtantDoc();
if (!doc || !principal)
return false;