mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 1454140: Invalid URLs with ref also exist. r=heycam
MozReview-Commit-ID: HsH3ERcTeLm --HG-- extra : rebase_source : 0cac89785ba837bbbe1a56e5d7b217e98f0996bb
This commit is contained in:
parent
39e46efded
commit
cbdd3db954
4
layout/style/crashtests/1454140.html
Normal file
4
layout/style/crashtests/1454140.html
Normal file
@ -0,0 +1,4 @@
|
||||
<!-- A -->
|
||||
<table background="
|
||||
#"><base href=Y:
|
||||
<!-- A -->
|
@ -272,3 +272,4 @@ load 1409183.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) load 1445682.html
|
||||
load 1450691.html
|
||||
pref(dom.webcomponents.shadowdom.enabled,true) load 1453206.html
|
||||
load 1454140.html
|
||||
|
@ -2175,8 +2175,12 @@ nsStyleImageRequest::Resolve(
|
||||
if (GetImageValue()->HasRef()) {
|
||||
bool isEqualExceptRef = false;
|
||||
RefPtr<nsIURI> imageURI = GetImageURI();
|
||||
imageURI->EqualsExceptRef(docURI, &isEqualExceptRef);
|
||||
if (isEqualExceptRef) {
|
||||
if (!imageURI) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (NS_SUCCEEDED(imageURI->EqualsExceptRef(docURI, &isEqualExceptRef)) &&
|
||||
isEqualExceptRef) {
|
||||
// Prevent loading an internal resource.
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user