зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1162700 - Split the AppInfo into initial setting of the values and the further initialization. r=smaug
This commit is contained in:
Родитель
fe47f2573a
Коммит
e20f8e396f
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче