Bug 1388907 - Add @mozilla.com and @testpilot- extension identifiers for SVG context-fill icons. r=jwatt

MozReview-Commit-ID: 7yHdgNfsrTc
This commit is contained in:
Jonathan Kingston committed 2017-08-10 01:19:14 +01:00
1 parent 6d8a08b3d0
commit 63308385c6
1 file changed
+5 -1
+5 -1
View File
@@ -64,7 +64,11 @@ SVGContextPaint::IsAllowedForImageFromURI(nsIURI* aURI)
RefPtr<BasePrincipal> principal = BasePrincipal::CreateCodebasePrincipal(aURI, OriginAttributes());
nsString addonId;
if (NS_SUCCEEDED(principal->GetAddonId(addonId))) {
return StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.org"));
if (StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.org"))
|| StringEndsWith(addonId, NS_LITERAL_STRING("@mozilla.com"))
|| StringBeginsWith(addonId, NS_LITERAL_STRING("@testpilot-"))) {
return true;
}
}
return false;
}