diff --git a/dom/xul/nsXULElement.cpp b/dom/xul/nsXULElement.cpp index 7d8d24c8bb48..f54bef3bd604 100644 --- a/dom/xul/nsXULElement.cpp +++ b/dom/xul/nsXULElement.cpp @@ -1599,13 +1599,13 @@ nsXULElement::LoadSrc() // Usually xul elements are used in chrome, which doesn't have // session history at all. slots->mFrameLoader = nsFrameLoader::Create(this, false); + NS_ENSURE_TRUE(slots->mFrameLoader, NS_OK); + if (AttrValueIs(kNameSpaceID_None, nsGkAtoms::prerendered, NS_LITERAL_STRING("true"), eIgnoreCase)) { nsresult rv = slots->mFrameLoader->SetIsPrerendered(); NS_ENSURE_SUCCESS(rv,rv); } - - NS_ENSURE_TRUE(slots->mFrameLoader, NS_OK); } return slots->mFrameLoader->LoadFrame();