зеркало из https://github.com/mozilla/gecko-dev.git
Bug 451958 - Implement same-origin check plus Access Controls for video Part 2a - r+sr=roc
This commit is contained in:
Родитель
aebb11c75d
Коммит
ae5a3d959f
|
@ -259,6 +259,20 @@ NS_IMETHODIMP nsHTMLMediaElement::Load()
|
|||
mChannel = nsnull;
|
||||
}
|
||||
|
||||
PRInt16 shouldLoad = nsIContentPolicy::ACCEPT;
|
||||
rv = NS_CheckContentLoadPolicy(nsIContentPolicy::TYPE_MEDIA,
|
||||
uri,
|
||||
NodePrincipal(),
|
||||
this,
|
||||
EmptyCString(), // mime type
|
||||
nsnull, // extra
|
||||
&shouldLoad,
|
||||
nsContentUtils::GetContentPolicy(),
|
||||
nsContentUtils::GetSecurityManager());
|
||||
if (NS_FAILED(rv) || NS_CP_REJECTED(shouldLoad)) {
|
||||
return NS_ERROR_CONTENT_BLOCKED;
|
||||
}
|
||||
|
||||
rv = NS_NewChannel(getter_AddRefs(mChannel),
|
||||
uri,
|
||||
nsnull,
|
||||
|
|
Загрузка…
Ссылка в новой задаче