mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 845668 Part 1: Remove nsFrameMessageManager::IsChromeProcess r=smaug
This commit is contained in:
parent
2a312ab4db
commit
bad7d32b05
@ -44,19 +44,6 @@ using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::dom::ipc;
|
||||
|
||||
|
||||
static bool
|
||||
IsChromeProcess()
|
||||
{
|
||||
nsCOMPtr<nsIXULRuntime> rt = do_GetService("@mozilla.org/xre/runtime;1");
|
||||
if (!rt)
|
||||
return true;
|
||||
|
||||
uint32_t type;
|
||||
rt->GetProcessType(&type);
|
||||
return type == nsIXULRuntime::PROCESS_TYPE_DEFAULT;
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(nsFrameMessageManager)
|
||||
uint32_t count = tmp->mListeners.Length();
|
||||
for (uint32_t i = 0; i < count; i++) {
|
||||
@ -836,7 +823,8 @@ nsFrameMessageManager::Disconnect(bool aRemoveFromParent)
|
||||
nsresult
|
||||
NS_NewGlobalMessageManager(nsIMessageBroadcaster** aResult)
|
||||
{
|
||||
NS_ENSURE_TRUE(IsChromeProcess(), NS_ERROR_NOT_AVAILABLE);
|
||||
NS_ENSURE_TRUE(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
NS_ERROR_NOT_AVAILABLE);
|
||||
nsFrameMessageManager* mm = new nsFrameMessageManager(nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
@ -1387,7 +1375,8 @@ NS_NewParentProcessMessageManager(nsIMessageBroadcaster** aResult)
|
||||
{
|
||||
NS_ASSERTION(!nsFrameMessageManager::sParentProcessManager,
|
||||
"Re-creating sParentProcessManager");
|
||||
NS_ENSURE_TRUE(IsChromeProcess(), NS_ERROR_NOT_AVAILABLE);
|
||||
NS_ENSURE_TRUE(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
NS_ERROR_NOT_AVAILABLE);
|
||||
nsRefPtr<nsFrameMessageManager> mm = new nsFrameMessageManager(nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
@ -1432,7 +1421,7 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult)
|
||||
"Re-creating sChildProcessManager");
|
||||
|
||||
MessageManagerCallback* cb;
|
||||
if (IsChromeProcess()) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
cb = new SameChildProcessMessageManagerCallback();
|
||||
} else {
|
||||
cb = new ChildProcessMessageManagerCallback();
|
||||
|
Loading…
Reference in New Issue
Block a user