mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1440827 - Cancel preloaded requests if we decide not to use them r=baku
This commit is contained in:
parent
e0820d72b0
commit
1ce8789ad0
6
dom/html/crashtests/1440827.html
Normal file
6
dom/html/crashtests/1440827.html
Normal file
@ -0,0 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
>
|
||||
<meta content='referrer no-referrer;manifest-src self http:' http-equiv='Content-Security-Policy'>
|
||||
<script src='http://zzzzzz.z'></script>
|
@ -1623,6 +1623,7 @@ ScriptLoader::LookupPreloadRequest(nsIScriptElement* aElement,
|
||||
mDocument->GetReferrerPolicy() != request->mReferrerPolicy ||
|
||||
aScriptKind != request->mKind) {
|
||||
// Drop the preload.
|
||||
request->Cancel();
|
||||
AccumulateCategorical(LABELS_DOM_SCRIPT_PRELOAD_RESULT::RequestMismatch);
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user