bug 895700 - load user fonts at high priority r=roc

This commit is contained in:
Patrick McManus
2013-11-16 09:34:25 -05:00
parent 4b1ad97eeb
commit ec9cc5fc8f

View File

@@ -29,6 +29,7 @@
#include "nsIContentSecurityPolicy.h"
#include "nsIDocShell.h"
#include "nsIWebNavigation.h"
#include "nsISupportsPriority.h"
#include "nsINetworkSeer.h"
#include "nsIConsoleService.h"
@@ -373,6 +374,11 @@ nsUserFontSet::StartLoad(gfxMixedFontFamily* aFamily,
nsCOMPtr<nsIHttpChannel> httpChannel(do_QueryInterface(channel));
if (httpChannel)
httpChannel->SetReferrer(aFontFaceSrc->mReferrer);
nsCOMPtr<nsISupportsPriority> priorityChannel(do_QueryInterface(channel));
if (priorityChannel) {
priorityChannel->AdjustPriority(nsISupportsPriority::PRIORITY_HIGH);
}
rv = NS_NewStreamLoader(getter_AddRefs(streamLoader), fontLoader);
NS_ENSURE_SUCCESS(rv, rv);