зеркало из https://github.com/mozilla/gecko-dev.git
Bug 522515 - omit null urls from inclusion in userfont src descriptor array. r=dbaron
This commit is contained in:
Родитель
a103db7527
Коммит
c23a17de07
|
@ -622,7 +622,12 @@ nsUserFontSet::InsertRule(nsCSSFontFaceRule *aRule, uint8_t aSheetType,
|
|||
case eCSSUnit_URL:
|
||||
face->mIsLocal = false;
|
||||
face->mURI = val.GetURLValue();
|
||||
NS_ASSERTION(face->mURI, "null url in @font-face rule");
|
||||
if (!face->mURI) {
|
||||
// if URI not valid, omit from src array
|
||||
srcArray.RemoveElementAt(srcArray.Length() - 1);
|
||||
NS_WARNING("null url in @font-face rule");
|
||||
continue;
|
||||
}
|
||||
face->mReferrer = val.GetURLStructValue()->mReferrer;
|
||||
face->mOriginPrincipal = val.GetURLStructValue()->mOriginPrincipal;
|
||||
NS_ASSERTION(face->mOriginPrincipal, "null origin principal in @font-face rule");
|
||||
|
|
Загрузка…
Ссылка в новой задаче