Bug 782006: Prefetch the "built-in" stylesheet cache in content processes. r=roc

This commit is contained in:
Chris Jones 2012-08-15 18:46:03 -07:00
parent b5aa2f402e
commit 204039910c

View File

@ -48,6 +48,7 @@
#include "nsJSEnvironment.h"
#include "SandboxHal.h"
#include "nsDebugImpl.h"
#include "nsLayoutStylesheetCache.h"
#include "History.h"
#include "nsDocShellCID.h"
@ -908,11 +909,20 @@ ContentChild::RecvCycleCollect()
return true;
}
static void
PreloadSlowThings()
{
// This fetches and creates all the built-in stylesheets.
nsLayoutStylesheetCache::UserContentSheet();
}
bool
ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID)
{
mAppInfo.version.Assign(version);
mAppInfo.buildID.Assign(buildID);
PreloadSlowThings();
return true;
}