зеркало из https://github.com/mozilla/gecko-dev.git
Bug 663570 - MetaCSP Part 7: CSP preload validation (r=bz)
This commit is contained in:
Родитель
3bac30dca9
Коммит
ee41183113
|
@ -563,7 +563,12 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
|
|||
ourCORSMode == request->mCORSMode &&
|
||||
ourRefPolicy == request->mReferrerPolicy) {
|
||||
rv = CheckContentPolicy(mDocument, aElement, request->mURI, type, false);
|
||||
NS_ENSURE_SUCCESS(rv, false);
|
||||
if (NS_FAILED(rv)) {
|
||||
// probably plans have changed; even though the preload was allowed seems
|
||||
// like the actual load is not; let's cancel the preload request.
|
||||
request->Cancel();
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
// Drop the preload
|
||||
request = nullptr;
|
||||
|
|
Загрузка…
Ссылка в новой задаче