From 17966fae9d6edf2fad8497185597f53ec0c4841e Mon Sep 17 00:00:00 2001 From: Chris Pearce Date: Sun, 25 Jan 2009 21:08:06 +1300 Subject: [PATCH] Bug 451958. Add more CheckLoadURIs (part 4). r+sr=roc --HG-- extra : rebase_source : de1defd553b7f14cd5a5c1f04ccd0821b4422e4d --- content/media/video/src/nsMediaStream.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/media/video/src/nsMediaStream.cpp b/content/media/video/src/nsMediaStream.cpp index d58ff9ab609..ddd0b898305 100644 --- a/content/media/video/src/nsMediaStream.cpp +++ b/content/media/video/src/nsMediaStream.cpp @@ -518,8 +518,14 @@ nsresult nsHttpStreamStrategy::OpenInternal(nsIStreamListener **aStreamListener, &rv); NS_ENSURE_TRUE(listener, NS_ERROR_OUT_OF_MEMORY); NS_ENSURE_SUCCESS(rv, rv); - } + } else { + rv = nsContentUtils::GetSecurityManager()-> + CheckLoadURIWithPrincipal(element->NodePrincipal(), + mURI, + nsIScriptSecurityManager::STANDARD); + NS_ENSURE_SUCCESS(rv, rv); + } // Use a byte range request from the start of the resource. // This enables us to detect if the stream supports byte range // requests, and therefore seeking, early.