Bug 1015576 - fixing performance regression on android. r=mrbkap

This commit is contained in:
Gabor Krizsanits 2014-06-02 13:28:55 +02:00
parent f77300baa2
commit f9659651e3

View File

@ -252,11 +252,6 @@ HTMLLinkElement::CreateAndDispatchEvent(nsIDocument* aDoc,
void
HTMLLinkElement::UpdateImport()
{
if (!Preferences::GetBool("dom.webcomponents.enabled")) {
// For now imports are hidden behind a pref...
return;
}
// 1. link node should be attached to the document.
nsCOMPtr<nsIDocument> doc = GetCurrentDoc();
if (!doc) {
@ -294,6 +289,11 @@ HTMLLinkElement::UpdateImport()
return;
}
if (!Preferences::GetBool("dom.webcomponents.enabled")) {
// For now imports are hidden behind a pref...
return;
}
nsRefPtr<ImportManager> manager = doc->ImportManager();
MOZ_ASSERT(manager, "ImportManager should be created lazily when needed");