Bug 1133594 - Hide nsFrameMessageManager::sChildProcessManager (r=smaug)

This commit is contained in:
Bill McCloskey 2015-02-19 17:12:38 -08:00
Родитель 3315a6def5
Коммит e310fd9b2a
5 изменённых файлов: 12 добавлений и 8 удалений

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

@ -169,8 +169,8 @@ MarkMessageManagers()
if (nsFrameMessageManager::sSameProcessParentManager) {
nsFrameMessageManager::sSameProcessParentManager->MarkForCC();
}
if (nsFrameMessageManager::sChildProcessManager) {
nsFrameMessageManager::sChildProcessManager->MarkForCC();
if (nsFrameMessageManager::GetChildProcessManager()) {
nsFrameMessageManager::GetChildProcessManager()->MarkForCC();
}
}

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

@ -1656,7 +1656,7 @@ public:
NS_IMETHOD Run()
{
nsFrameMessageManager* ppm = nsFrameMessageManager::sChildProcessManager;
nsFrameMessageManager* ppm = nsFrameMessageManager::GetChildProcessManager();
ReceiveMessage(static_cast<nsIContentFrameMessageManager*>(ppm), ppm);
return NS_OK;
}
@ -1920,7 +1920,7 @@ nsFrameMessageManager::NewProcessMessageManager(mozilla::dom::nsIContentParent*
nsresult
NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult)
{
NS_ASSERTION(!nsFrameMessageManager::sChildProcessManager,
NS_ASSERTION(!nsFrameMessageManager::GetChildProcessManager(),
"Re-creating sChildProcessManager");
MessageManagerCallback* cb;
@ -1933,7 +1933,7 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult)
nsFrameMessageManager* mm = new nsFrameMessageManager(cb,
nullptr,
MM_PROCESSMANAGER | MM_OWNSCALLBACK);
nsFrameMessageManager::sChildProcessManager = mm;
nsFrameMessageManager::SetChildProcessManager(mm);
return CallQueryInterface(mm, aResult);
}

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

@ -274,6 +274,10 @@ public:
{
return sChildProcessManager;
}
static void SetChildProcessManager(nsFrameMessageManager* aManager)
{
sChildProcessManager = aManager;
}
private:
nsresult SendMessage(const nsAString& aMessageName,
JS::Handle<JS::Value> aJSON,
@ -307,10 +311,10 @@ protected:
nsFrameMessageManager* aChildMM);
public:
static nsFrameMessageManager* sParentProcessManager;
static nsFrameMessageManager* sChildProcessManager;
static nsFrameMessageManager* sSameProcessParentManager;
static nsTArray<nsCOMPtr<nsIRunnable> >* sPendingSameProcessAsyncMessages;
private:
static nsFrameMessageManager* sChildProcessManager;
enum ProcessCheckerType {
PROCESS_CHECKER_PERMISSION,
PROCESS_CHECKER_MANIFEST_URL,

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

@ -1919,7 +1919,7 @@ ContentChild::RecvAsyncMessage(const nsString& aMsg,
InfallibleTArray<CpowEntry>&& aCpows,
const IPC::Principal& aPrincipal)
{
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::sChildProcessManager;
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::GetChildProcessManager();
if (cpm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData);
CrossProcessCpowHolder cpows(this, aCpows);

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

@ -113,7 +113,7 @@ nsIContentChild::RecvAsyncMessage(const nsString& aMsg,
InfallibleTArray<CpowEntry>&& aCpows,
const IPC::Principal& aPrincipal)
{
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::sChildProcessManager;
nsRefPtr<nsFrameMessageManager> cpm = nsFrameMessageManager::GetChildProcessManager();
if (cpm) {
StructuredCloneData cloneData = ipc::UnpackClonedMessageDataForChild(aData);
CrossProcessCpowHolder cpows(this, aCpows);