Bug 1162700 - Split the AppInfo into initial setting of the values and the further initialization. r=smaug

This commit is contained in:
Milan Sreckovic 2015-05-14 10:49:38 -04:00
Родитель fe47f2573a
Коммит e20f8e396f
4 изменённых файлов: 21 добавлений и 8 удалений

Просмотреть файл

@ -2282,6 +2282,12 @@ ContentChild::RecvAppInfo(const nsCString& version, const nsCString& buildID,
mAppInfo.ID.Assign(ID);
mAppInfo.vendor.Assign(vendor);
return true;
}
bool
ContentChild::RecvAppInit()
{
if (!Preferences::GetBool("dom.ipc.processPrelaunch.enabled", false)) {
return true;
}

Просмотреть файл

@ -345,6 +345,7 @@ public:
virtual bool RecvAppInfo(const nsCString& version, const nsCString& buildID,
const nsCString& name, const nsCString& UAName,
const nsCString& ID, const nsCString& vendor) override;
virtual bool RecvAppInit() override;
virtual bool RecvLastPrivateDocShellDestroyed() override;

Просмотреть файл

@ -2426,6 +2426,18 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
// must come after the Open() call above.
ProcessPriorityManager::SetProcessPriority(this, aInitialPriority);
if (gAppData) {
nsCString version(gAppData->version);
nsCString buildID(gAppData->buildID);
nsCString name(gAppData->name);
nsCString UAName(gAppData->UAName);
nsCString ID(gAppData->ID);
nsCString vendor(gAppData->vendor);
// Sending all information to content process.
unused << SendAppInfo(version, buildID, name, UAName, ID, vendor);
}
if (aSetupOffMainThreadCompositing) {
// NB: internally, this will send an IPC message to the child
// process to get it to create the CompositorChild. This
@ -2457,15 +2469,8 @@ ContentParent::InitInternal(ProcessPriority aInitialPriority,
}
if (gAppData) {
nsCString version(gAppData->version);
nsCString buildID(gAppData->buildID);
nsCString name(gAppData->name);
nsCString UAName(gAppData->UAName);
nsCString ID(gAppData->ID);
nsCString vendor(gAppData->vendor);
// Sending all information to content process.
unused << SendAppInfo(version, buildID, name, UAName, ID, vendor);
unused << SendAppInit();
}
nsStyleSheetService *sheetService = nsStyleSheetService::GetInstance();

Просмотреть файл

@ -565,6 +565,7 @@ child:
AppInfo(nsCString version, nsCString buildID, nsCString name, nsCString UAName,
nsCString ID, nsCString vendor);
AppInit();
// Notify child that last-pb-context-exited notification was observed
LastPrivateDocShellDestroyed();