mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 13:23:07 +00:00
import changes from rmottola/Arctic-Fox:
- Goanna->Gecko: GoannaMediaPluginService & GoannaTouchDispatcher (1e10799bf) - Goanna->Gecko: GoannaProcess (dd671240a) - Goanna->Gecko: goannamediaplugin (2a9423ba6) - Goanna->Gecko: GoannaContentController (62e7c2f5f) - Goanna->Gecko: GoannaProfiler & GoannaTaskTracer (376c45a3c)
This commit is contained in:
@@ -284,7 +284,7 @@ IPCAccessibilityActive()
|
||||
#ifdef MOZ_B2G
|
||||
return false;
|
||||
#else
|
||||
return XRE_GetProcessType() == GoannaProcessType_Content &&
|
||||
return XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
mozilla::Preferences::GetBool("accessibility.ipc_architecture.enabled", true);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ nsCoreUtils::IsTabDocument(nsIDocument* aDocumentNode)
|
||||
treeItem->GetParent(getter_AddRefs(parentTreeItem));
|
||||
|
||||
// Tab document running in own process doesn't have parent.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content)
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content)
|
||||
return !parentTreeItem;
|
||||
|
||||
// Parent of docshell for tab document running in chrome process is root.
|
||||
|
||||
@@ -273,9 +273,9 @@ GetClosestInterestingAccessible(id anObject)
|
||||
if (!mGoannaAccessible)
|
||||
return nil;
|
||||
|
||||
Accessible* focusedGoannaChild = mGoannaAccessible->FocusedChild();
|
||||
if (focusedGoannaChild) {
|
||||
mozAccessible *focusedChild = GetNativeFromGoannaAccessible(focusedGoannaChild);
|
||||
Accessible* focusedGeckoChild = mGoannaAccessible->FocusedChild();
|
||||
if (focusedGeckoChild) {
|
||||
mozAccessible *focusedChild = GetNativeFromGoannaAccessible(focusedGeckoChild);
|
||||
if (focusedChild)
|
||||
return GetClosestInterestingAccessible(focusedChild);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ nsWinUtils::MaybeStartWindowEmulation()
|
||||
// with tabs.
|
||||
if (Compatibility::IsJAWS() || Compatibility::IsWE() ||
|
||||
Compatibility::IsDolphin() ||
|
||||
XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
RegisterNativeWindow(kClassNameTabContent);
|
||||
sHWNDCache = new nsRefPtrHashtable<nsPtrHashKey<void>, DocAccessible>(2);
|
||||
return true;
|
||||
|
||||
@@ -701,7 +701,7 @@
|
||||
@BINPATH@/@PREF_DIR@/b2g.js
|
||||
#endif
|
||||
@BINPATH@/@PREF_DIR@/channel-prefs.js
|
||||
@BINPATH@/goanna.js
|
||||
@BINPATH@/gecko.js
|
||||
@BINPATH@/defaults/autoconfig/platform.js
|
||||
@BINPATH@/defaults/autoconfig/prefcalls.js
|
||||
@BINPATH@/defaults/profile/prefs.js
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
@RESPATH@/components/composer.xpt
|
||||
@RESPATH@/components/content_events.xpt
|
||||
@RESPATH@/components/content_html.xpt
|
||||
@RESPATH@/components/content_goannamediaplugins.xpt
|
||||
@RESPATH@/components/content_geckomediaplugins.xpt
|
||||
#ifdef MOZ_WEBRTC
|
||||
@RESPATH@/components/content_webrtc.xpt
|
||||
#endif
|
||||
@@ -689,7 +689,7 @@
|
||||
; All the pref files must be part of base to prevent migration bugs
|
||||
@RESPATH@/browser/@PREF_DIR@/palemoon.js
|
||||
@RESPATH@/browser/@PREF_DIR@/palemoon-branding.js
|
||||
@RESPATH@/goanna.js
|
||||
@RESPATH@/gecko.js
|
||||
@RESPATH@/defaults/autoconfig/platform.js
|
||||
@RESPATH@/defaults/autoconfig/prefcalls.js
|
||||
@RESPATH@/browser/defaults/profile/prefs.js
|
||||
|
||||
@@ -245,9 +245,9 @@ def processLeakLog(leakLogFile, options):
|
||||
leakThresholds = getattr(options, 'leakThresholds', {})
|
||||
ignoreMissingLeaks = getattr(options, 'ignoreMissingLeaks', [])
|
||||
|
||||
# This list is based on kGoannaProcessTypeString. ipdlunittest processes likely
|
||||
# This list is based on kGeckoProcessTypeString. ipdlunittest processes likely
|
||||
# are not going to produce leak logs we will ever see.
|
||||
knownProcessTypes = ["default", "plugin", "tab", "goannamediaplugin"]
|
||||
knownProcessTypes = ["default", "plugin", "tab", "geckomediaplugin"]
|
||||
|
||||
for processType in knownProcessTypes:
|
||||
log.info("TEST-INFO | leakcheck | %s process: leak threshold set at %d bytes"
|
||||
|
||||
@@ -22,7 +22,7 @@ static nsresult
|
||||
BroadcastDomainSetChange(DomainSetType aSetType, DomainSetChangeType aChangeType,
|
||||
nsIURI* aDomain = nullptr)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default,
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
"DomainPolicy should only be exposed to the chrome process.");
|
||||
|
||||
nsTArray<ContentParent*> parents;
|
||||
@@ -45,7 +45,7 @@ DomainPolicy::DomainPolicy() : mBlacklist(new DomainSet(BLACKLIST))
|
||||
, mWhitelist(new DomainSet(WHITELIST))
|
||||
, mSuperWhitelist(new DomainSet(SUPER_WHITELIST))
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
BroadcastDomainSetChange(NO_TYPE, ACTIVATE_POLICY);
|
||||
}
|
||||
}
|
||||
@@ -112,7 +112,7 @@ DomainPolicy::Deactivate()
|
||||
if (ssm) {
|
||||
ssm->DeactivateDomainPolicy();
|
||||
}
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
BroadcastDomainSetChange(NO_TYPE, DEACTIVATE_POLICY);
|
||||
}
|
||||
return NS_OK;
|
||||
@@ -170,7 +170,7 @@ DomainSet::Add(nsIURI* aDomain)
|
||||
nsCOMPtr<nsIURI> clone = GetCanonicalClone(aDomain);
|
||||
NS_ENSURE_TRUE(clone, NS_ERROR_FAILURE);
|
||||
mHashTable.PutEntry(clone);
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default)
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default)
|
||||
return BroadcastDomainSetChange(mType, ADD_DOMAIN, aDomain);
|
||||
|
||||
return NS_OK;
|
||||
@@ -182,7 +182,7 @@ DomainSet::Remove(nsIURI* aDomain)
|
||||
nsCOMPtr<nsIURI> clone = GetCanonicalClone(aDomain);
|
||||
NS_ENSURE_TRUE(clone, NS_ERROR_FAILURE);
|
||||
mHashTable.RemoveEntry(clone);
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default)
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default)
|
||||
return BroadcastDomainSetChange(mType, REMOVE_DOMAIN, aDomain);
|
||||
|
||||
return NS_OK;
|
||||
@@ -192,7 +192,7 @@ NS_IMETHODIMP
|
||||
DomainSet::Clear()
|
||||
{
|
||||
mHashTable.Clear();
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default)
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default)
|
||||
return BroadcastDomainSetChange(mType, CLEAR_DOMAINS);
|
||||
|
||||
return NS_OK;
|
||||
|
||||
@@ -1326,7 +1326,7 @@ nsScriptSecurityManager::~nsScriptSecurityManager(void)
|
||||
// ContentChild might hold a reference to the domain policy,
|
||||
// and it might release it only after the security manager is
|
||||
// gone. But we can still assert this for the main process.
|
||||
MOZ_ASSERT_IF(XRE_GetProcessType() == GoannaProcessType_Default,
|
||||
MOZ_ASSERT_IF(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
!mDomainPolicy);
|
||||
}
|
||||
|
||||
@@ -1543,7 +1543,7 @@ nsScriptSecurityManager::GetDomainPolicyActive(bool *aRv)
|
||||
NS_IMETHODIMP
|
||||
nsScriptSecurityManager::ActivateDomainPolicy(nsIDomainPolicy** aRv)
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return NS_ERROR_SERVICE_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
|
||||
@@ -690,7 +690,7 @@ nsChromeRegistry::GetSingleton()
|
||||
}
|
||||
|
||||
nsRefPtr<nsChromeRegistry> cr;
|
||||
if (GoannaProcessType_Content == XRE_GetProcessType())
|
||||
if (GeckoProcessType_Content == XRE_GetProcessType())
|
||||
cr = new nsChromeRegistryContent();
|
||||
else
|
||||
cr = new nsChromeRegistryChrome();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#define TimelineMarker_h__
|
||||
|
||||
#include "nsString.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/dom/ProfileTimelineMarkerBinding.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
@@ -450,7 +450,7 @@ nsDefaultURIFixup::KeywordToURI(const nsACString& aKeyword,
|
||||
}
|
||||
keyword.Trim(" ");
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
dom::ContentChild* contentChild = dom::ContentChild::GetSingleton();
|
||||
if (!contentChild) {
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
#include "nsDocShellEnumerator.h"
|
||||
#include "nsSHistory.h"
|
||||
#include "nsDocShellEditorData.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
// Helper Classes
|
||||
#include "nsError.h"
|
||||
@@ -817,7 +817,7 @@ IncreasePrivateDocShellCount()
|
||||
{
|
||||
gNumberOfPrivateDocShells++;
|
||||
if (gNumberOfPrivateDocShells > 1 ||
|
||||
XRE_GetProcessType() != GoannaProcessType_Content) {
|
||||
XRE_GetProcessType() != GeckoProcessType_Content) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -831,7 +831,7 @@ DecreasePrivateDocShellCount()
|
||||
MOZ_ASSERT(gNumberOfPrivateDocShells > 0);
|
||||
gNumberOfPrivateDocShells--;
|
||||
if (!gNumberOfPrivateDocShells) {
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
dom::ContentChild* cc = dom::ContentChild::GetSingleton();
|
||||
cc->SendPrivateDocShellsExist(false);
|
||||
return;
|
||||
@@ -5053,7 +5053,7 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
|
||||
mInPrivateBrowsing ? nsISocketProvider::NO_PERMANENT_STORAGE : 0;
|
||||
bool isStsHost = false;
|
||||
bool isPinnedHost = false;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsISiteSecurityService> sss =
|
||||
do_GetService(NS_SSSERVICE_CONTRACTID, &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
@@ -7513,7 +7513,7 @@ nsDocShell::OnRedirectStateChange(nsIChannel* aOldChannel,
|
||||
nsCOMPtr<nsIApplicationCacheChannel> appCacheChannel =
|
||||
do_QueryInterface(aNewChannel);
|
||||
if (appCacheChannel) {
|
||||
if (GoannaProcessType_Default != XRE_GetProcessType()) {
|
||||
if (GeckoProcessType_Default != XRE_GetProcessType()) {
|
||||
// Permission will be checked in the parent process.
|
||||
appCacheChannel->SetChooseApplicationCache(true);
|
||||
} else {
|
||||
@@ -10779,7 +10779,7 @@ nsDocShell::DoURILoad(nsIURI* aURI,
|
||||
|
||||
// Loads with the correct permissions should check for a matching
|
||||
// application cache.
|
||||
if (GoannaProcessType_Default != XRE_GetProcessType()) {
|
||||
if (GeckoProcessType_Default != XRE_GetProcessType()) {
|
||||
// Permission will be checked in the parent process
|
||||
appCacheChannel->SetChooseApplicationCache(true);
|
||||
} else {
|
||||
@@ -14159,7 +14159,7 @@ nsDocShell::MaybeNotifyKeywordSearchLoading(const nsString& aProvider,
|
||||
return;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
dom::ContentChild* contentChild = dom::ContentChild::GetSingleton();
|
||||
if (contentChild) {
|
||||
contentChild->SendNotifyKeywordSearchLoading(aProvider, aKeyword);
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/WeakPtr.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/dom/ProfileTimelineMarkerBinding.h"
|
||||
#include "jsapi.h"
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace {
|
||||
bool
|
||||
IsMainProcess()
|
||||
{
|
||||
return XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
}
|
||||
|
||||
// Anything smaller should compile fast enough that caching will just add
|
||||
|
||||
@@ -57,7 +57,7 @@ AudioChannelService::GetAudioChannelService()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return AudioChannelServiceChild::GetAudioChannelService();
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ AudioChannelService::GetOrCreateAudioChannelService()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return AudioChannelServiceChild::GetOrCreateAudioChannelService();
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ AudioChannelService::GetOrCreateAudioChannelService()
|
||||
void
|
||||
AudioChannelService::Shutdown()
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return AudioChannelServiceChild::Shutdown();
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ AudioChannelService::AudioChannelService()
|
||||
, mDisabled(false)
|
||||
, mDefChannelChildID(CONTENT_PROCESS_ID_UNKNOWN)
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
if (obs) {
|
||||
obs->AddObserver(this, "ipc:content-shutdown", false);
|
||||
@@ -167,7 +167,7 @@ AudioChannelService::RegisterType(AudioChannel aChannel, uint64_t aChildID,
|
||||
AudioChannelInternalType type = GetInternalType(aChannel, true);
|
||||
mChannelCounters[type].AppendElement(aChildID);
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
|
||||
// We must keep the childIds in order to decide which app is allowed to play
|
||||
// with then telephony channel.
|
||||
@@ -259,7 +259,7 @@ AudioChannelService::UnregisterType(AudioChannel aChannel,
|
||||
// There are two reasons to defer the decrease of telephony channel.
|
||||
// 1. User can have time to remove device from his ear before music resuming.
|
||||
// 2. Give BT SCO to be disconnected before starting to connect A2DP.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
|
||||
if (aChannel == AudioChannel::Telephony) {
|
||||
UnregisterTelephonyChild(aChildID);
|
||||
@@ -293,7 +293,7 @@ AudioChannelService::UnregisterTypeInternal(AudioChannel aChannel,
|
||||
|
||||
// In order to avoid race conditions, it's safer to notify any existing
|
||||
// agent any time a new one is registered.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// No hidden content channel is playable if the original playable hidden
|
||||
// process does not need to play audio from background anymore.
|
||||
if (aChannel == AudioChannel::Content &&
|
||||
@@ -518,7 +518,7 @@ AudioChannelService::SetDefaultVolumeControlChannelInternal(int32_t aChannel,
|
||||
bool aVisible,
|
||||
uint64_t aChildID)
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -561,7 +561,7 @@ AudioChannelService::SetDefaultVolumeControlChannelInternal(int32_t aChannel,
|
||||
void
|
||||
AudioChannelService::SendAudioChannelChangedNotification(uint64_t aChildID)
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ Crypto::GetRandomValues(JSContext* aCx, const ArrayBufferView& aArray,
|
||||
|
||||
uint8_t* data = aArray.Data();
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
InfallibleTArray<uint8_t> randomValues;
|
||||
// Tell the parent process to generate random values via PContent
|
||||
ContentChild* cc = ContentChild::GetSingleton();
|
||||
|
||||
@@ -1417,7 +1417,7 @@ Navigator::GetFeature(const nsAString& aName, ErrorResult& aRv)
|
||||
#if defined(XP_LINUX)
|
||||
if (aName.EqualsLiteral("hardware.memory")) {
|
||||
// with seccomp enabled, fopen() should be in a non-sandboxed process
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
uint32_t memLevel = mozilla::hal::GetTotalSystemMemoryLevel();
|
||||
if (memLevel == 0) {
|
||||
p->MaybeReject(NS_ERROR_NOT_AVAILABLE);
|
||||
@@ -2454,7 +2454,7 @@ Navigator::HasTVSupport(JSContext* aCx, JSObject* aGlobal)
|
||||
bool
|
||||
Navigator::IsE10sEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||
{
|
||||
return XRE_GetProcessType() == GoannaProcessType_Content;
|
||||
return XRE_GetProcessType() == GeckoProcessType_Content;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
@@ -139,7 +139,7 @@ static void
|
||||
MarkMessageManagers()
|
||||
{
|
||||
// The global message manager only exists in the root process.
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return;
|
||||
}
|
||||
nsCOMPtr<nsIMessageBroadcaster> strongGlobalMM =
|
||||
|
||||
@@ -237,7 +237,7 @@ nsContentPermissionUtils::AskPermission(nsIContentPermissionRequest* aRequest, n
|
||||
NS_ENSURE_STATE(aWindow && aWindow->IsCurrentInnerWindow());
|
||||
|
||||
// for content process
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
|
||||
nsRefPtr<RemotePermissionRequest> req =
|
||||
new RemotePermissionRequest(aRequest, aWindow);
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
#include "nsIBaseWindow.h"
|
||||
#include "nsIDocShellTreeOwner.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "nsIContentIterator.h"
|
||||
#include "nsIDOMStyleSheet.h"
|
||||
|
||||
@@ -10609,7 +10609,7 @@ PLDHashOperator UnlockEnumerator(imgIRequest* aKey,
|
||||
nsresult
|
||||
nsDocument::SetImageLockingState(bool aLocked)
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content &&
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
!Preferences::GetBool("image.mem.allow_locking_in_content_processes", true)) {
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -11137,7 +11137,7 @@ nsIDocument::ExitFullscreen(nsIDocument* aDoc, bool aRunAsync)
|
||||
static bool
|
||||
HasCrossProcessParent(nsIDocument* aDocument)
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Content) {
|
||||
return false;
|
||||
}
|
||||
if (aDocument->GetParentDocument() != nullptr) {
|
||||
|
||||
@@ -712,7 +712,7 @@ nsFocusManager::WindowRaised(nsIDOMWindow* aWindow)
|
||||
// If this is a parent or single process window, send the activate event.
|
||||
// Events for child process windows will be sent when ParentActivated
|
||||
// is called.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
ActivateOrDeactivate(window, true);
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ nsFocusManager::WindowLowered(nsIDOMWindow* aWindow)
|
||||
// If this is a parent or single process window, send the deactivate event.
|
||||
// Events for child process windows will be sent when ParentActivated
|
||||
// is called.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
ActivateOrDeactivate(window, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
|
||||
#include "mozilla/layout/RenderFrameParent.h"
|
||||
#include "nsIAppsService.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#include "jsapi.h"
|
||||
#include "mozilla/dom/HTMLIFrameElement.h"
|
||||
@@ -1661,12 +1661,12 @@ nsFrameLoader::ShouldUseRemoteProcess()
|
||||
|
||||
// Don't try to launch nested children if we don't have OMTC.
|
||||
// They won't render!
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content &&
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
!CompositorChild::ChildProcessHasCompositor()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content &&
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
!(PR_GetEnv("MOZ_NESTED_OOP_TABS") ||
|
||||
Preferences::GetBool("dom.ipc.tabs.nested.enabled", false))) {
|
||||
return false;
|
||||
@@ -2698,7 +2698,7 @@ nsFrameLoader::ResetPermissionManagerStatus()
|
||||
{
|
||||
// The resetting of the permissions status can run only
|
||||
// in the main process.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -827,7 +827,7 @@ nsFrameMessageManager::Dump(const nsAString& aStr)
|
||||
NS_IMETHODIMP
|
||||
nsFrameMessageManager::PrivateNoteIntentionalCrash()
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mozilla::NoteIntentionalCrash("tab");
|
||||
return NS_OK;
|
||||
} else {
|
||||
@@ -1439,7 +1439,7 @@ MessageManagerReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIMessageBroadcaster> globalmm =
|
||||
do_GetService("@mozilla.org/globalmessagemanager;1");
|
||||
if (globalmm) {
|
||||
@@ -1475,7 +1475,7 @@ MessageManagerReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
nsresult
|
||||
NS_NewGlobalMessageManager(nsIMessageBroadcaster** aResult)
|
||||
{
|
||||
NS_ENSURE_TRUE(XRE_GetProcessType() == GoannaProcessType_Default,
|
||||
NS_ENSURE_TRUE(XRE_GetProcessType() == GeckoProcessType_Default,
|
||||
NS_ERROR_NOT_AVAILABLE);
|
||||
nsFrameMessageManager* mm = new nsFrameMessageManager(nullptr,
|
||||
nullptr,
|
||||
@@ -2032,7 +2032,7 @@ NS_NewChildProcessMessageManager(nsISyncMessageSender** aResult)
|
||||
"Re-creating sChildProcessManager");
|
||||
|
||||
MessageManagerCallback* cb;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
cb = new SameChildProcessMessageManagerCallback();
|
||||
} else {
|
||||
cb = new ChildProcessMessageManagerCallback();
|
||||
|
||||
@@ -9320,7 +9320,7 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aUrl, nsIVariant* aArgument,
|
||||
(aUrl, aArgument, aOptions, aError), aError,
|
||||
nullptr);
|
||||
|
||||
if (!IsShowModalDialogEnabled() || XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (!IsShowModalDialogEnabled() || XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
aError.Throw(NS_ERROR_NOT_AVAILABLE);
|
||||
return nullptr;
|
||||
}
|
||||
@@ -11138,7 +11138,7 @@ nsGlobalWindow::ShowSlowScriptDialog()
|
||||
unsigned lineno;
|
||||
bool hasFrame = JS::DescribeScriptedCaller(cx, &filename, &lineno);
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content &&
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content &&
|
||||
ProcessHangMonitor::Get()) {
|
||||
ProcessHangMonitor::SlowScriptAction action;
|
||||
nsRefPtr<ProcessHangMonitor> monitor = ProcessHangMonitor::Get();
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
#include "mozilla/ContentEvents.h"
|
||||
|
||||
#include "nsCycleCollectionNoteRootCallback.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIScriptSecurityManager.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "nsDOMJSUtils.h" // for GetScriptContextFromJSContext
|
||||
#include "nsJSPrincipals.h"
|
||||
#include "xpcpublic.h"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "nsObjectLoadingContent.h"
|
||||
#include "mozAutoDocUpdate.h"
|
||||
#include "nsIContentSecurityPolicy.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "nsPluginFrame.h"
|
||||
#include "nsDOMClassInfo.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
|
||||
@@ -529,7 +529,7 @@ nsWindowMemoryReporter::CollectReports(nsIMemoryReporterCallback* aCb,
|
||||
// Collect window memory usage.
|
||||
nsWindowSizes windowTotalSizes(nullptr);
|
||||
nsCOMPtr<amIAddonManager> addonManager;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// Only try to access the service from the main process.
|
||||
addonManager = do_GetService("@mozilla.org/addons/integration;1");
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
#include "nsIFileChannel.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "jsfriendapi.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/dom/EncodingUtils.h"
|
||||
#include "nsIUnicodeDecoder.h"
|
||||
#include "mozilla/dom/XMLHttpRequestBinding.h"
|
||||
@@ -3022,7 +3022,7 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable<RequestBody>& aBody)
|
||||
if (scheme.LowerCaseEqualsLiteral("app") ||
|
||||
scheme.LowerCaseEqualsLiteral("jar")) {
|
||||
mIsMappedArrayBuffer = true;
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIJARChannel> jarChannel = do_QueryInterface(mChannel);
|
||||
// For memory mapping from child process, we need to get file
|
||||
// descriptor of the JAR file opened remotely on the parent proess.
|
||||
|
||||
@@ -789,7 +789,7 @@ BluetoothAdapter::SendFile(const nsAString& aDeviceAddress,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// In-process transfer
|
||||
bs->SendFile(aDeviceAddress, &aBlob, results);
|
||||
} else {
|
||||
|
||||
@@ -98,7 +98,7 @@ bool sToggleInProgress = false;
|
||||
bool
|
||||
IsMainProcess()
|
||||
{
|
||||
return XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -1046,7 +1046,7 @@ BluetoothAdapter::SendFile(const nsAString& aDeviceAddress,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// In-process transfer
|
||||
bs->SendFile(aDeviceAddress, &aBlob, results);
|
||||
} else {
|
||||
|
||||
@@ -247,7 +247,7 @@ DispatchStatusChangedEvent(const nsAString& aType,
|
||||
bool
|
||||
IsMainProcess()
|
||||
{
|
||||
return XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
}
|
||||
|
||||
END_BLUETOOTH_NAMESPACE
|
||||
|
||||
@@ -151,7 +151,7 @@ NS_CreateCellBroadcastService()
|
||||
{
|
||||
nsCOMPtr<nsICellBroadcastService> service;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
service = new mozilla::dom::cellbroadcast::CellBroadcastIPCService();
|
||||
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
} else {
|
||||
|
||||
@@ -129,7 +129,7 @@ bool
|
||||
IsMainProcess()
|
||||
{
|
||||
static const bool isMainProcess =
|
||||
XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
return isMainProcess;
|
||||
}
|
||||
|
||||
|
||||
@@ -562,7 +562,7 @@ FileUpdateDispatcher::Observe(nsISupports* aSubject,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
// Child process. Forward the notification to the parent.
|
||||
ContentChild::GetSingleton()
|
||||
->SendFilePathUpdateNotify(dsf->mStorageType,
|
||||
@@ -693,7 +693,7 @@ DeviceStorageFile::Dump(const char* label)
|
||||
path = NS_LITERAL_STRING("(null)");
|
||||
}
|
||||
const char* ptStr;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
ptStr = "parent";
|
||||
} else {
|
||||
ptStr = "child";
|
||||
@@ -815,7 +815,7 @@ OverrideRootDir::Init()
|
||||
}
|
||||
|
||||
if (sDirs->overrideRootDir) {
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
// Only the parent process can create directories. In testing, because
|
||||
// the preference is updated after startup, its entirely possible that
|
||||
// the preference updated notification will be received by a child
|
||||
@@ -937,7 +937,7 @@ InitDirs()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
NS_GetSpecialDirectory("UAppData", getter_AddRefs(sDirs->crashes));
|
||||
if (sDirs->crashes) {
|
||||
sDirs->crashes->Append(NS_LITERAL_STRING("Crash Reports"));
|
||||
@@ -2059,7 +2059,7 @@ ContinueCursorEvent::~ContinueCursorEvent() {}
|
||||
void
|
||||
ContinueCursorEvent::Continue()
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
DebugOnly<nsresult> rv = NS_DispatchToMainThread(this);
|
||||
MOZ_ASSERT(NS_SUCCEEDED(rv));
|
||||
return;
|
||||
@@ -2243,7 +2243,7 @@ nsDOMDeviceStorageCursor::Allow(JS::HandleValue aChoices)
|
||||
return NS_DispatchToMainThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(this, mFile);
|
||||
DeviceStorageEnumerationParams params(mFile->mStorageType,
|
||||
@@ -2990,7 +2990,7 @@ public:
|
||||
return NS_DispatchToCurrentThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
|
||||
DeviceStorageCreateFdParams params;
|
||||
params.type() = mFile->mStorageType;
|
||||
@@ -3030,7 +3030,7 @@ public:
|
||||
return NS_DispatchToCurrentThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
BlobChild* actor
|
||||
= ContentChild::GetSingleton()->GetOrCreateActorForBlob(
|
||||
static_cast<File*>(mBlob.get()));
|
||||
@@ -3076,7 +3076,7 @@ public:
|
||||
return NS_DispatchToCurrentThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
BlobChild* actor
|
||||
= ContentChild::GetSingleton()->GetOrCreateActorForBlob(
|
||||
static_cast<File*>(mBlob.get()));
|
||||
@@ -3122,7 +3122,7 @@ public:
|
||||
return NS_DispatchToCurrentThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageGetParams params(mFile->mStorageType,
|
||||
@@ -3156,7 +3156,7 @@ public:
|
||||
return NS_DispatchToCurrentThread(r);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageDeleteParams params(mFile->mStorageType,
|
||||
@@ -3172,7 +3172,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_FREE_SPACE:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageFreeSpaceParams params(mFile->mStorageType,
|
||||
@@ -3187,7 +3187,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_USED_SPACE:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageUsedSpaceParams params(mFile->mStorageType,
|
||||
@@ -3208,7 +3208,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_AVAILABLE:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageAvailableParams params(mFile->mStorageType,
|
||||
@@ -3223,7 +3223,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_STATUS:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageStatusParams params(mFile->mStorageType,
|
||||
@@ -3244,7 +3244,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_FORMAT:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageFormatParams params(mFile->mStorageType,
|
||||
@@ -3259,7 +3259,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_MOUNT:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageMountParams params(mFile->mStorageType,
|
||||
@@ -3274,7 +3274,7 @@ public:
|
||||
|
||||
case DEVICE_STORAGE_REQUEST_UNMOUNT:
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
PDeviceStorageRequestChild* child
|
||||
= new DeviceStorageRequestChild(mRequest, mFile);
|
||||
DeviceStorageUnmountParams params(mFile->mStorageType,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "nsIDocument.h"
|
||||
#include "nsINode.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/ContentEvents.h"
|
||||
#include "mozilla/dom/CloseEvent.h"
|
||||
#include "mozilla/dom/DeviceOrientationEvent.h"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "Units.h"
|
||||
#include "mozilla/layers/APZCTreeManager.h"
|
||||
|
||||
@@ -604,7 +604,7 @@ EventStateManager::PreHandleEvent(nsPresContext* aPresContext,
|
||||
// window edge) wont update the cursor if the cached value and the current
|
||||
// cursor match. So when the mouse exits a remote frame, clear the cached
|
||||
// widget cursor so a proper update will occur when the mouse re-enters.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ClearCachedWidgetCursor(mCurrentTarget);
|
||||
}
|
||||
|
||||
|
||||
@@ -857,7 +857,7 @@ IMEStateManager::SetIMEState(const IMEState& aState,
|
||||
// XXX I think that we should use nsContentUtils::IsCallerChrome() instead
|
||||
// of the process type.
|
||||
if (aAction.mCause == InputContextAction::CAUSE_UNKNOWN &&
|
||||
XRE_GetProcessType() != GoannaProcessType_Content) {
|
||||
XRE_GetProcessType() != GeckoProcessType_Content) {
|
||||
aAction.mCause = InputContextAction::CAUSE_UNKNOWN_CHROME;
|
||||
}
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ void
|
||||
FileInputStreamWrapper::Serialize(InputStreamParams& aParams,
|
||||
FileDescriptorArray& /* aFDs */)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsCOMPtr<nsIInputStream> thisStream = do_QueryObject(this);
|
||||
|
||||
@@ -69,7 +69,7 @@ FileSystemUtils::IsDescendantPath(const nsAString& aPath,
|
||||
bool
|
||||
FileSystemUtils::IsParentProcess()
|
||||
{
|
||||
return XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
return XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
}
|
||||
|
||||
} // namespace dom
|
||||
|
||||
@@ -42,7 +42,7 @@ BEGIN_FMRADIO_NAMESPACE
|
||||
IFMRadioService*
|
||||
IFMRadioService::Singleton()
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return FMRadioChild::Singleton();
|
||||
} else {
|
||||
return FMRadioService::Singleton();
|
||||
@@ -1240,7 +1240,7 @@ FMRadioService::UpdateFrequency()
|
||||
FMRadioService*
|
||||
FMRadioService::Singleton()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!sFMRadioService) {
|
||||
|
||||
@@ -338,7 +338,7 @@ FMRadioChild::EnableAudio(bool aAudioEnabled)
|
||||
FMRadioChild*
|
||||
FMRadioChild::Singleton()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
if (!sFMRadioChild) {
|
||||
|
||||
@@ -542,7 +542,7 @@ already_AddRefed<nsIDOMGeoPosition>
|
||||
nsGeolocationRequest::AdjustedLocation(nsIDOMGeoPosition *aPosition)
|
||||
{
|
||||
nsCOMPtr<nsIDOMGeoPosition> pos = aPosition;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
GPSLOG("child process just copying position");
|
||||
return pos.forget();
|
||||
}
|
||||
@@ -736,7 +736,7 @@ nsresult nsGeolocationService::Init()
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
sGeoInitPending = false;
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -988,7 +988,7 @@ nsGeolocationService::StartDevice(nsIPrincipal *aPrincipal)
|
||||
// inactivivity
|
||||
SetDisconnectTimer();
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentChild* cpc = ContentChild::GetSingleton();
|
||||
cpc->SendAddGeolocationListener(IPC::Principal(aPrincipal),
|
||||
HighAccuracyRequested());
|
||||
@@ -1051,7 +1051,7 @@ nsGeolocationService::UpdateAccuracy(bool aForceHigh)
|
||||
{
|
||||
bool highRequired = aForceHigh || HighAccuracyRequested();
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentChild* cpc = ContentChild::GetSingleton();
|
||||
if (cpc->IsAlive()) {
|
||||
cpc->SendSetGeolocationHigherAccuracy(highRequired);
|
||||
@@ -1078,7 +1078,7 @@ nsGeolocationService::StopDevice()
|
||||
mDisconnectTimer = nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentChild* cpc = ContentChild::GetSingleton();
|
||||
cpc->SendRemoveGeolocationListener();
|
||||
return; // bail early
|
||||
|
||||
@@ -48,7 +48,7 @@ already_AddRefed<nsGeolocationSettings>
|
||||
nsGeolocationSettings::GetGeolocationSettings()
|
||||
{
|
||||
// this singleton is only needed in the parent process...
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -1034,7 +1034,7 @@ UploadLastDir::FetchDirectoryAndDisplayPicker(nsIDocument* aDoc,
|
||||
new UploadLastDir::ContentPrefCallback(aFilePicker, aFpCallback);
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
prefCallback->HandleCompletion(nsIContentPrefCallback2::COMPLETE_ERROR);
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -1065,7 +1065,7 @@ UploadLastDir::StoreLastUsedDirectory(nsIDocument* aDoc, nsIFile* aDir)
|
||||
}
|
||||
|
||||
#ifdef MOZ_B2G
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "nsIPropertyBag2.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsObjectLoadingContent.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "mozilla/dom/ContentChild.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozIApplication.h"
|
||||
#include "nsAttrValueInlines.h"
|
||||
#include "nsContentUtils.h"
|
||||
@@ -581,7 +581,7 @@ nsGenericHTMLFrameElement::GetAppManifestURL(nsAString& aOut)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
NS_WARNING("Can't embed-apps. Embed-apps is restricted to in-proc apps, see bug 1059662");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -1131,7 +1131,7 @@ BackgroundFactoryRequestChild::RecvPermissionChallenge(
|
||||
return false;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsPIDOMWindow> window = mFactory->GetParentObject();
|
||||
MOZ_ASSERT(window);
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ FileImplSnapshot::~FileImplSnapshot()
|
||||
void
|
||||
FileImplSnapshot::AssertSanity()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
|
||||
@@ -247,7 +247,7 @@ IndexedDatabaseManager::GetOrCreate()
|
||||
}
|
||||
|
||||
if (!gDBManager) {
|
||||
sIsMainProcess = XRE_GetProcessType() == GoannaProcessType_Default;
|
||||
sIsMainProcess = XRE_GetProcessType() == GeckoProcessType_Default;
|
||||
|
||||
if (!sLoggingModule) {
|
||||
sLoggingModule = PR_NewLogModule("IndexedDB");
|
||||
@@ -585,7 +585,7 @@ IndexedDatabaseManager::IsMainProcess()
|
||||
{
|
||||
NS_ASSERTION(gDBManager,
|
||||
"IsMainProcess() called before indexedDB has been initialized!");
|
||||
NS_ASSERTION((XRE_GetProcessType() == GoannaProcessType_Default) ==
|
||||
NS_ASSERTION((XRE_GetProcessType() == GeckoProcessType_Default) ==
|
||||
sIsMainProcess, "XRE_GetProcessType changed its tune!");
|
||||
return sIsMainProcess;
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ const uint32_t kPermissionDefault = nsIPermissionManager::UNKNOWN_ACTION;
|
||||
void
|
||||
AssertSanity()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
// source files.
|
||||
|
||||
#include "BackgroundChildImpl.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "IDBCursor.h"
|
||||
#include "IDBDatabase.h"
|
||||
#include "IDBIndex.h"
|
||||
|
||||
+25
-25
@@ -84,7 +84,7 @@ static_assert(FileDescriptorSet::MAX_DESCRIPTORS_PER_MESSAGE == 250,
|
||||
|
||||
StaticRefPtr<nsIUUIDGenerator> gUUIDGenerator;
|
||||
|
||||
GoannaProcessType gProcessType = GoannaProcessType_Invalid;
|
||||
GeckoProcessType gProcessType = GeckoProcessType_Invalid;
|
||||
|
||||
void
|
||||
CommonStartup()
|
||||
@@ -92,7 +92,7 @@ CommonStartup()
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
gProcessType = XRE_GetProcessType();
|
||||
MOZ_ASSERT(gProcessType != GoannaProcessType_Invalid);
|
||||
MOZ_ASSERT(gProcessType != GeckoProcessType_Invalid);
|
||||
|
||||
nsCOMPtr<nsIUUIDGenerator> uuidGen = do_GetService(kUUIDGeneratorContractId);
|
||||
MOZ_RELEASE_ASSERT(uuidGen);
|
||||
@@ -137,7 +137,7 @@ AssertCorrectThreadForManager(nsIContentChild* aManager)
|
||||
void
|
||||
AssertCorrectThreadForManager(nsIContentParent* aManager)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ AssertCorrectThreadForManager(PBackgroundChild* aManager)
|
||||
void
|
||||
AssertCorrectThreadForManager(PBackgroundParent* aManager)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
AssertIsOnBackgroundThread();
|
||||
}
|
||||
|
||||
@@ -796,7 +796,7 @@ already_AddRefed<FileImpl>
|
||||
CreateBlobImpl(const nsID& aKnownBlobIDData,
|
||||
const CreateBlobImplMetadata& aMetadata)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(aMetadata.mHasRecursed);
|
||||
|
||||
nsRefPtr<FileImpl> blobImpl = BlobParent::GetBlobImplForID(aKnownBlobIDData);
|
||||
@@ -821,7 +821,7 @@ CreateBlobImpl(const nsTArray<uint8_t>& aMemoryData,
|
||||
static_assert(sizeof(size_t) <= sizeof(uint64_t),
|
||||
"size_t won't fit in uint64_t!");
|
||||
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
nsRefPtr<FileImpl> blobImpl;
|
||||
|
||||
@@ -871,7 +871,7 @@ already_AddRefed<FileImpl>
|
||||
CreateBlobImpl(intptr_t aAddRefedInputStream,
|
||||
const CreateBlobImplMetadata& aMetadata)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(aMetadata.mIsSameProcessActor);
|
||||
MOZ_ASSERT(aAddRefedInputStream);
|
||||
|
||||
@@ -909,7 +909,7 @@ already_AddRefed<FileImpl>
|
||||
CreateBlobImplFromBlobData(const BlobData& aBlobData,
|
||||
CreateBlobImplMetadata& aMetadata)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
nsRefPtr<FileImpl> blobImpl;
|
||||
|
||||
@@ -945,7 +945,7 @@ already_AddRefed<FileImpl>
|
||||
CreateBlobImpl(const nsTArray<BlobData>& aBlobDatas,
|
||||
CreateBlobImplMetadata& aMetadata)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
// Special case for a multipart blob with only one part.
|
||||
if (aBlobDatas.Length() == 1) {
|
||||
@@ -1010,7 +1010,7 @@ CreateBlobImpl(const ParentBlobConstructorParams& aParams,
|
||||
const BlobData& aBlobData,
|
||||
bool aIsSameProcessActor)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(aParams.blobParams().type() ==
|
||||
AnyBlobConstructorParams::TNormalBlobConstructorParams ||
|
||||
aParams.blobParams().type() ==
|
||||
@@ -1058,7 +1058,7 @@ CreateBlobImpl(const ParentBlobConstructorParams& aParams,
|
||||
void
|
||||
BlobDataFromBlobImpl(FileImpl* aBlobImpl, BlobData& aBlobData)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType != GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType != GeckoProcessType_Default);
|
||||
MOZ_ASSERT(aBlobImpl);
|
||||
|
||||
const nsTArray<nsRefPtr<FileImpl>>* subBlobs = aBlobImpl->GetSubBlobImpls();
|
||||
@@ -2189,7 +2189,7 @@ RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor,
|
||||
, mIsSlice(false)
|
||||
{
|
||||
MOZ_ASSERT(aSameProcessBlobImpl);
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
CommonInit(aActor);
|
||||
}
|
||||
@@ -2204,7 +2204,7 @@ RemoteBlobImpl::RemoteBlobImpl(BlobChild* aActor,
|
||||
, mIsSlice(false)
|
||||
{
|
||||
MOZ_ASSERT(aSameProcessBlobImpl);
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
CommonInit(aActor);
|
||||
}
|
||||
@@ -2314,7 +2314,7 @@ RemoteBlobImpl::GetMozFullPathInternal(nsAString& aFilePath,
|
||||
}
|
||||
|
||||
if (mSameProcessFileImpl) {
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
mSameProcessFileImpl->GetMozFullPathInternal(aFilePath, aRv);
|
||||
return;
|
||||
@@ -2343,7 +2343,7 @@ RemoteBlobImpl::CreateSlice(uint64_t aStart,
|
||||
{
|
||||
// May be called on any thread.
|
||||
if (mSameProcessFileImpl) {
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
return mSameProcessFileImpl->CreateSlice(aStart,
|
||||
aLength,
|
||||
@@ -2362,7 +2362,7 @@ RemoteBlobImpl::GetInternalStream(nsIInputStream** aStream)
|
||||
{
|
||||
// May be called on any thread.
|
||||
if (mSameProcessFileImpl) {
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
nsCOMPtr<nsIInputStream> realStream;
|
||||
nsresult rv =
|
||||
@@ -2390,7 +2390,7 @@ RemoteBlobImpl::GetFileId()
|
||||
}
|
||||
|
||||
if (mSameProcessFileImpl) {
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
return mSameProcessFileImpl->GetFileId();
|
||||
}
|
||||
@@ -3133,7 +3133,7 @@ BlobChild::CommonInit(const ChildBlobConstructorParams& aParams)
|
||||
}
|
||||
|
||||
case AnyBlobConstructorParams::TSameProcessBlobConstructorParams: {
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
|
||||
const SameProcessBlobConstructorParams& params =
|
||||
blobParams.get_SameProcessBlobConstructorParams();
|
||||
@@ -3229,7 +3229,7 @@ BlobChild::AssertIsOnOwningThread() const
|
||||
void
|
||||
BlobChild::Startup(const FriendKey& /* aKey */)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GeckoProcessType_Default);
|
||||
|
||||
CommonStartup();
|
||||
}
|
||||
@@ -3308,7 +3308,7 @@ BlobChild::GetOrCreateFromImpl(ChildManagerType* aManager,
|
||||
|
||||
nsCOMPtr<nsIInputStream> snapshotInputStream;
|
||||
|
||||
if (gProcessType == GoannaProcessType_Default) {
|
||||
if (gProcessType == GeckoProcessType_Default) {
|
||||
nsCOMPtr<PIFileImplSnapshot> snapshot = do_QueryInterface(aBlobImpl);
|
||||
if (snapshot) {
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(
|
||||
@@ -3316,7 +3316,7 @@ BlobChild::GetOrCreateFromImpl(ChildManagerType* aManager,
|
||||
}
|
||||
}
|
||||
|
||||
if (gProcessType == GoannaProcessType_Default && !snapshotInputStream) {
|
||||
if (gProcessType == GeckoProcessType_Default && !snapshotInputStream) {
|
||||
nsRefPtr<FileImpl> sameProcessImpl = aBlobImpl;
|
||||
auto addRefedFileImpl =
|
||||
reinterpret_cast<intptr_t>(sameProcessImpl.forget().take());
|
||||
@@ -3415,7 +3415,7 @@ BlobChild::SendSliceConstructor(ChildManagerType* aManager,
|
||||
BlobChild* newActor = new BlobChild(aManager, id, aRemoteBlobSliceImpl);
|
||||
|
||||
if (aManager->SendPBlobConstructor(newActor, aParams)) {
|
||||
if (gProcessType != GoannaProcessType_Default || !NS_IsMainThread()) {
|
||||
if (gProcessType != GeckoProcessType_Default || !NS_IsMainThread()) {
|
||||
newActor->SendWaitForSliceCreation();
|
||||
}
|
||||
return newActor;
|
||||
@@ -3751,7 +3751,7 @@ BlobParent::AssertIsOnOwningThread() const
|
||||
void
|
||||
BlobParent::Startup(const FriendKey& /* aKey */)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
CommonStartup();
|
||||
|
||||
@@ -3807,7 +3807,7 @@ BlobParent::Create(PBackgroundParent* aManager,
|
||||
already_AddRefed<FileImpl>
|
||||
BlobParent::GetBlobImplForID(const nsID& aID)
|
||||
{
|
||||
if (NS_WARN_IF(gProcessType != GoannaProcessType_Default)) {
|
||||
if (NS_WARN_IF(gProcessType != GeckoProcessType_Default)) {
|
||||
ASSERT_UNLESS_FUZZING();
|
||||
return nullptr;
|
||||
}
|
||||
@@ -4557,7 +4557,7 @@ IDTableEntry::GetOrCreateInternal(const nsID& aID,
|
||||
bool aMayGet,
|
||||
bool aIgnoreProcessID)
|
||||
{
|
||||
MOZ_ASSERT(gProcessType == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(gProcessType == GeckoProcessType_Default);
|
||||
MOZ_ASSERT(sIDTableMutex);
|
||||
sIDTableMutex->AssertNotCurrentThreadOwns();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "ContentChild.h"
|
||||
|
||||
#include "BlobChild.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "TabChild.h"
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "mozilla/ipc/BackgroundChild.h"
|
||||
#include "mozilla/ipc/FileDescriptorSetChild.h"
|
||||
#include "mozilla/ipc/FileDescriptorUtils.h"
|
||||
#include "mozilla/ipc/GoannaChildProcessHost.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/ipc/TestShellChild.h"
|
||||
#include "mozilla/jsipc/CrossProcessObjectWrappers.h"
|
||||
#include "mozilla/layers/CompositorChild.h"
|
||||
@@ -2662,7 +2662,7 @@ uint64_t
|
||||
NextWindowID()
|
||||
{
|
||||
uint64_t processID = 0;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
ContentChild* cc = ContentChild::GetSingleton();
|
||||
processID = cc->GetID();
|
||||
}
|
||||
|
||||
+11
-11
@@ -692,7 +692,7 @@ ContentParent::StartUp()
|
||||
// child process
|
||||
sCanLaunchSubprocesses = true;
|
||||
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -739,7 +739,7 @@ ContentParent::JoinProcessesIOThread(const nsTArray<ContentParent*>* aProcesses,
|
||||
{
|
||||
const nsTArray<ContentParent*>& processes = *aProcesses;
|
||||
for (uint32_t i = 0; i < processes.Length(); ++i) {
|
||||
if (GoannaChildProcessHost* process = processes[i]->mSubprocess) {
|
||||
if (GeckoChildProcessHost* process = processes[i]->mSubprocess) {
|
||||
process->Join();
|
||||
}
|
||||
}
|
||||
@@ -1000,7 +1000,7 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
|
||||
}
|
||||
|
||||
ProcessPriority initialPriority = GetInitialProcessPriority(aFrameElement);
|
||||
bool isInContentProcess = (XRE_GetProcessType() != GoannaProcessType_Default);
|
||||
bool isInContentProcess = (XRE_GetProcessType() != GeckoProcessType_Default);
|
||||
TabId tabId;
|
||||
|
||||
nsIDocShell* docShell = GetOpenerDocShellHelper(aFrameElement);
|
||||
@@ -1470,7 +1470,7 @@ ContentParent::SetPriorityAndCheckIsAlive(ProcessPriority aPriority)
|
||||
//
|
||||
// Bug 943174: use waitid() with WNOWAIT so that, if the process
|
||||
// did exit, we won't consume its zombie and confuse the
|
||||
// GoannaChildProcessHost dtor. Also, if the process isn't a
|
||||
// GeckoChildProcessHost dtor. Also, if the process isn't a
|
||||
// direct child because of Nuwa this will fail with ECHILD, and we
|
||||
// need to assume the child is alive in that case rather than
|
||||
// assuming it's dead (as is otherwise a reasonable fallback).
|
||||
@@ -1669,7 +1669,7 @@ ContentParent::OnChannelError()
|
||||
|
||||
void
|
||||
ContentParent::OnBeginSyncTransaction() {
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIConsoleService> console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
|
||||
JSContext *cx = nsContentUtils::GetCurrentJSContext();
|
||||
if (console && cx) {
|
||||
@@ -1771,11 +1771,11 @@ ContentParent::RecvDeallocateLayerTreeId(const uint64_t& aId)
|
||||
namespace {
|
||||
|
||||
void
|
||||
DelayedDeleteSubprocess(GoannaChildProcessHost* aSubprocess)
|
||||
DelayedDeleteSubprocess(GeckoChildProcessHost* aSubprocess)
|
||||
{
|
||||
XRE_GetIOMessageLoop()
|
||||
->PostTask(FROM_HERE,
|
||||
new DeleteTask<GoannaChildProcessHost>(aSubprocess));
|
||||
new DeleteTask<GeckoChildProcessHost>(aSubprocess));
|
||||
}
|
||||
|
||||
// This runnable only exists to delegate ownership of the
|
||||
@@ -2057,7 +2057,7 @@ ContentParent::ContentParent(mozIApplication* aApp,
|
||||
ChildPrivileges privs = aIsNuwaProcess
|
||||
? base::PRIVILEGES_INHERIT
|
||||
: base::PRIVILEGES_DEFAULT;
|
||||
mSubprocess = new GoannaChildProcessHost(GoannaProcessType_Content, privs);
|
||||
mSubprocess = new GeckoChildProcessHost(GeckoProcessType_Content, privs);
|
||||
|
||||
IToplevelProtocol::SetTransport(mSubprocess->GetChannel());
|
||||
|
||||
@@ -2130,7 +2130,7 @@ ContentParent::ContentParent(ContentParent* aTemplate,
|
||||
const FileDescriptor* fd = FindFdProtocolFdMapping(aFds, GetProtocolId());
|
||||
|
||||
NS_ASSERTION(fd != nullptr, "IPC Channel for PContent is necessary!");
|
||||
mSubprocess = new GoannaExistingProcessHost(GoannaProcessType_Content,
|
||||
mSubprocess = new GoannaExistingProcessHost(GeckoProcessType_Content,
|
||||
aPid,
|
||||
*fd);
|
||||
|
||||
@@ -4462,7 +4462,7 @@ ContentParent::AllocateTabId(const TabId& aOpenerTabId,
|
||||
const ContentParentId& aCpId)
|
||||
{
|
||||
TabId tabId;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
ContentProcessManager *cpm = ContentProcessManager::GetSingleton();
|
||||
tabId = cpm->AllocateTabId(aOpenerTabId, aContext, aCpId);
|
||||
}
|
||||
@@ -4479,7 +4479,7 @@ ContentParent::AllocateTabId(const TabId& aOpenerTabId,
|
||||
ContentParent::DeallocateTabId(const TabId& aTabId,
|
||||
const ContentParentId& aCpId)
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
ContentProcessManager::GetSingleton()->DeallocateTabId(aCpId,
|
||||
aTabId);
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "mozilla/dom/PContentParent.h"
|
||||
#include "mozilla/dom/nsIContentParent.h"
|
||||
#include "mozilla/ipc/GoannaChildProcessHost.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/FileUtils.h"
|
||||
#include "mozilla/HalTypes.h"
|
||||
@@ -72,7 +72,7 @@ class ContentParent final : public PContentParent
|
||||
, public nsIDOMGeoPositionErrorCallback
|
||||
, public mozilla::LinkedListElement<ContentParent>
|
||||
{
|
||||
typedef mozilla::ipc::GoannaChildProcessHost GoannaChildProcessHost;
|
||||
typedef mozilla::ipc::GeckoChildProcessHost GeckoChildProcessHost;
|
||||
typedef mozilla::ipc::OptionalURIParams OptionalURIParams;
|
||||
typedef mozilla::ipc::PFileDescriptorSetParent PFileDescriptorSetParent;
|
||||
typedef mozilla::ipc::TestShellParent TestShellParent;
|
||||
@@ -212,7 +212,7 @@ public:
|
||||
bool IsNuwaProcess() const;
|
||||
#endif
|
||||
|
||||
GoannaChildProcessHost* Process() {
|
||||
GeckoChildProcessHost* Process() {
|
||||
return mSubprocess;
|
||||
}
|
||||
|
||||
@@ -783,7 +783,7 @@ private:
|
||||
// release these objects in ShutDownProcess. See the comment there for more
|
||||
// details.
|
||||
|
||||
GoannaChildProcessHost* mSubprocess;
|
||||
GeckoChildProcessHost* mSubprocess;
|
||||
ContentParent* mOpener;
|
||||
|
||||
ContentParentId mChildID;
|
||||
|
||||
@@ -32,7 +32,7 @@ ContentProcessManager::sSingleton;
|
||||
/* static */ ContentProcessManager*
|
||||
ContentProcessManager::GetSingleton()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
if (!sSingleton) {
|
||||
sSingleton = new ContentProcessManager();
|
||||
|
||||
@@ -54,7 +54,7 @@ using mozilla::CSSPoint from "Units.h";
|
||||
using mozilla::CSSToScreenScale from "Units.h";
|
||||
using mozilla::CommandInt from "mozilla/EventForwards.h";
|
||||
using mozilla::Modifiers from "mozilla/EventForwards.h";
|
||||
using mozilla::layers::GoannaContentController::APZStateChange from "mozilla/layers/GoannaContentController.h";
|
||||
using mozilla::layers::GeckoContentController::APZStateChange from "mozilla/layers/GeckoContentController.h";
|
||||
using mozilla::WritingMode from "WritingModes.h";
|
||||
|
||||
namespace mozilla {
|
||||
@@ -512,8 +512,8 @@ child:
|
||||
|
||||
UpdateFrame(FrameMetrics frame);
|
||||
|
||||
// The following methods correspond to functions on the GoannaContentController
|
||||
// interface in gfx/layers/apz/public/GoannaContentController.h. Refer to documentation
|
||||
// The following methods correspond to functions on the GeckoContentController
|
||||
// interface in gfx/layers/apz/public/GeckoContentController.h. Refer to documentation
|
||||
// in that file for these functions.
|
||||
RequestFlingSnap(ViewID aScrollID, CSSPoint aDestination);
|
||||
AcknowledgeScrollUpdate(ViewID aScrollId, uint32_t aScrollGeneration);
|
||||
|
||||
@@ -783,7 +783,7 @@ ProcessHangMonitor::ProcessHangMonitor()
|
||||
|
||||
MOZ_COUNT_CTOR(ProcessHangMonitor);
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();
|
||||
obs->AddObserver(this, "xpcom-shutdown", false);
|
||||
}
|
||||
|
||||
@@ -381,7 +381,7 @@ ProcessPriorityManagerImpl::StaticInit()
|
||||
}
|
||||
|
||||
// The process priority manager is main-process only.
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
sInitialized = true;
|
||||
return;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ ProcessPriorityManagerImpl::GetSingleton()
|
||||
ProcessPriorityManagerImpl::ProcessPriorityManagerImpl()
|
||||
: mHighPriority(false)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
RegisterWakeLockObserver(this);
|
||||
}
|
||||
|
||||
@@ -657,7 +657,7 @@ ParticularProcessPriorityManager::ParticularProcessPriorityManager(
|
||||
, mHoldsCPUWakeLock(false)
|
||||
, mHoldsHighPriorityWakeLock(false)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
LOGP("Creating ParticularProcessPriorityManager.");
|
||||
}
|
||||
|
||||
@@ -817,7 +817,7 @@ ParticularProcessPriorityManager::OnRemoteBrowserFrameShown(nsISupports* aSubjec
|
||||
TabParent* tp = TabParent::GetFrom(fl);
|
||||
NS_ENSURE_TRUE_VOID(tp);
|
||||
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
if (tp->Manager() != mContentParent) {
|
||||
return;
|
||||
}
|
||||
@@ -841,7 +841,7 @@ ParticularProcessPriorityManager::OnTabParentDestroyed(nsISupports* aSubject)
|
||||
nsCOMPtr<nsITabParent> tp = do_QueryInterface(aSubject);
|
||||
NS_ENSURE_TRUE_VOID(tp);
|
||||
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
if (TabParent::GetFrom(tp)->Manager() != mContentParent) {
|
||||
return;
|
||||
}
|
||||
@@ -860,7 +860,7 @@ ParticularProcessPriorityManager::OnFrameloaderVisibleChanged(nsISupports* aSubj
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
if (tp->Manager() != mContentParent) {
|
||||
return;
|
||||
}
|
||||
@@ -1224,7 +1224,7 @@ NS_IMPL_ISUPPORTS(ProcessPriorityManagerChild,
|
||||
|
||||
ProcessPriorityManagerChild::ProcessPriorityManagerChild()
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
mCachedPriority = PROCESS_PRIORITY_MASTER;
|
||||
} else {
|
||||
mCachedPriority = PROCESS_PRIORITY_UNKNOWN;
|
||||
@@ -1236,7 +1236,7 @@ ProcessPriorityManagerChild::Init()
|
||||
{
|
||||
// The process priority should only be changed in child processes; don't even
|
||||
// bother listening for changes if we're in the main process.
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
nsCOMPtr<nsIObserverService> os = services::GetObserverService();
|
||||
NS_ENSURE_TRUE_VOID(os);
|
||||
os->AddObserver(this, "ipc:process-priority-changed", /* weak = */ false);
|
||||
|
||||
@@ -371,7 +371,7 @@ TabParent::Destroy()
|
||||
}
|
||||
mIsDestroyed = true;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
Manager()->AsContentParent()->NotifyTabDestroying(this);
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@ TabParent::Destroy()
|
||||
bool
|
||||
TabParent::Recv__delete__()
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
Manager()->AsContentParent()->NotifyTabDestroyed(this, mMarkedDestroying);
|
||||
ContentParent::DeallocateTabId(mTabId,
|
||||
Manager()->AsContentParent()->ChildID());
|
||||
|
||||
@@ -1532,7 +1532,7 @@ MediaManager::NotifyRecordingStatusChange(nsPIDOMWindow* aWindow,
|
||||
|
||||
// Forward recording events to parent process.
|
||||
// The events are gathered in chrome process and used for recording indicator
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
unused <<
|
||||
dom::ContentChild::GetSingleton()->SendRecordingDeviceEvents(aMsg,
|
||||
requestURL,
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "nsMimeTypes.h"
|
||||
#include "nsProxyRelease.h"
|
||||
#include "nsTArray.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#ifdef LOG
|
||||
#undef LOG
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "mozilla/dom/AudioContextBinding.h"
|
||||
#include <algorithm>
|
||||
#include "DOMMediaStream.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#include "mozilla/unused.h"
|
||||
#ifdef MOZ_WEBRTC
|
||||
#include "AudioOutputObserver.h"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "webaudio/MediaStreamAudioDestinationNode.h"
|
||||
#include <algorithm>
|
||||
#include "DOMMediaStream.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
#ifdef MOZ_WEBRTC
|
||||
#include "AudioOutputObserver.h"
|
||||
#endif
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
|
||||
#include"GoannaProfiler.h"
|
||||
#include"GeckoProfiler.h"
|
||||
#include "OggWriter.h"
|
||||
#include "OpusTrackEncoder.h"
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "OMXCodecWrapper.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "ISOTrackMetadata.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
#include <android/log.h>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "OpusTrackEncoder.h"
|
||||
#include "nsString.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#include <opus/opus.h>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "prsystem.h"
|
||||
#include "WebMWriter.h"
|
||||
#include "libyuv.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <ogg/ogg.h>
|
||||
#include <vorbis/vorbisenc.h>
|
||||
#include "WebMWriter.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
// One actually used: Encoding using a VBR quality mode. The usable range is -.1
|
||||
// (lowest quality, smallest file) to 1. (highest quality, largest file).
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "nsThreadUtils.h"
|
||||
#include "MediaEncoder.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#undef LOG
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#include "nsCharSeparatedTokenizer.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "nsIRunnable.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "mozilla/unused.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "GMPTimerParent.h"
|
||||
@@ -83,7 +83,7 @@ GMPParent::CloneFrom(const GMPParent* aOther)
|
||||
}
|
||||
|
||||
nsresult
|
||||
GMPParent::Init(GoannaMediaPluginService *aService, nsIFile* aPluginDir)
|
||||
GMPParent::Init(GeckoMediaPluginService *aService, nsIFile* aPluginDir)
|
||||
{
|
||||
MOZ_ASSERT(aPluginDir);
|
||||
MOZ_ASSERT(aService);
|
||||
@@ -181,8 +181,8 @@ AbortWaitingForGMPAsyncShutdown(nsITimer* aTimer, void* aClosure)
|
||||
{
|
||||
NS_WARNING("Timed out waiting for GMP async shutdown!");
|
||||
GMPParent* parent = reinterpret_cast<GMPParent*>(aClosure);
|
||||
nsRefPtr<GoannaMediaPluginService> service =
|
||||
GoannaMediaPluginService::GetGoannaMediaPluginService();
|
||||
nsRefPtr<GeckoMediaPluginService> service =
|
||||
GeckoMediaPluginService::GetGeckoMediaPluginService();
|
||||
if (service) {
|
||||
service->AsyncShutdownComplete(parent);
|
||||
}
|
||||
@@ -209,8 +209,8 @@ GMPParent::EnsureAsyncShutdownTimeoutSet()
|
||||
}
|
||||
|
||||
int32_t timeout = GMP_DEFAULT_ASYNC_SHUTDONW_TIMEOUT;
|
||||
nsRefPtr<GoannaMediaPluginService> service =
|
||||
GoannaMediaPluginService::GetGoannaMediaPluginService();
|
||||
nsRefPtr<GeckoMediaPluginService> service =
|
||||
GeckoMediaPluginService::GetGeckoMediaPluginService();
|
||||
if (service) {
|
||||
timeout = service->AsyncShutdownTimeoutMs();
|
||||
}
|
||||
@@ -398,7 +398,7 @@ GMPParent::ChildTerminated()
|
||||
nsRefPtr<GMPParent> self(this);
|
||||
GMPThread()->Dispatch(NS_NewRunnableMethodWithArg<nsRefPtr<GMPParent>>(
|
||||
mService,
|
||||
&GoannaMediaPluginService::PluginTerminated,
|
||||
&GeckoMediaPluginService::PluginTerminated,
|
||||
self),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
@@ -508,7 +508,7 @@ nsIThread*
|
||||
GMPParent::GMPThread()
|
||||
{
|
||||
if (!mGMPThread) {
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mps = do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mps = do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
MOZ_ASSERT(mps);
|
||||
if (!mps) {
|
||||
return nullptr;
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
GMPParent();
|
||||
|
||||
nsresult Init(GoannaMediaPluginService *aService, nsIFile* aPluginDir);
|
||||
nsresult Init(GeckoMediaPluginService *aService, nsIFile* aPluginDir);
|
||||
nsresult CloneFrom(const GMPParent* aOther);
|
||||
|
||||
void Crash();
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
|
||||
private:
|
||||
~GMPParent();
|
||||
nsRefPtr<GoannaMediaPluginService> mService;
|
||||
nsRefPtr<GeckoMediaPluginService> mService;
|
||||
bool EnsureProcessLoaded();
|
||||
nsresult ReadGMPMetaData();
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||
|
||||
@@ -16,7 +16,7 @@ using std::vector;
|
||||
using std::string;
|
||||
|
||||
using mozilla::gmp::GMPProcessParent;
|
||||
using mozilla::ipc::GoannaChildProcessHost;
|
||||
using mozilla::ipc::GeckoChildProcessHost;
|
||||
using base::ProcessArchitecture;
|
||||
|
||||
template<>
|
||||
@@ -30,7 +30,7 @@ namespace mozilla {
|
||||
namespace gmp {
|
||||
|
||||
GMPProcessParent::GMPProcessParent(const std::string& aGMPPath)
|
||||
: GoannaChildProcessHost(GoannaProcessType_GMPlugin),
|
||||
: GeckoChildProcessHost(GeckoProcessType_GMPlugin),
|
||||
mGMPPath(aGMPPath)
|
||||
{
|
||||
MOZ_COUNT_CTOR(GMPProcessParent);
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
#include "base/thread.h"
|
||||
#include "base/waitable_event.h"
|
||||
#include "chrome/common/child_process_host.h"
|
||||
#include "mozilla/ipc/GoannaChildProcessHost.h"
|
||||
#include "mozilla/ipc/GeckoChildProcessHost.h"
|
||||
|
||||
class nsIRunnable;
|
||||
|
||||
namespace mozilla {
|
||||
namespace gmp {
|
||||
|
||||
class GMPProcessParent final : public mozilla::ipc::GoannaChildProcessHost
|
||||
class GMPProcessParent final : public mozilla::ipc::GeckoChildProcessHost
|
||||
{
|
||||
public:
|
||||
explicit GMPProcessParent(const std::string& aGMPPath);
|
||||
@@ -35,9 +35,9 @@ public:
|
||||
virtual bool CanShutdown() override { return true; }
|
||||
const std::string& GetPluginFilePath() { return mGMPPath; }
|
||||
|
||||
using mozilla::ipc::GoannaChildProcessHost::GetShutDownEvent;
|
||||
using mozilla::ipc::GoannaChildProcessHost::GetChannel;
|
||||
using mozilla::ipc::GoannaChildProcessHost::GetChildProcessHandle;
|
||||
using mozilla::ipc::GeckoChildProcessHost::GetShutDownEvent;
|
||||
using mozilla::ipc::GeckoChildProcessHost::GetChannel;
|
||||
using mozilla::ipc::GeckoChildProcessHost::GetChildProcessHandle;
|
||||
|
||||
private:
|
||||
void DoDelete();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "GMPParent.h"
|
||||
#include "GMPVideoDecoderParent.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "GoannaChildProcessHost.h"
|
||||
#include "GeckoChildProcessHost.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/ClearOnShutdown.h"
|
||||
#include "mozilla/SyncRunnable.h"
|
||||
@@ -65,17 +65,17 @@ GetGMPLog()
|
||||
namespace gmp {
|
||||
|
||||
static const uint32_t NodeIdSaltLength = 32;
|
||||
static StaticRefPtr<GoannaMediaPluginService> sSingletonService;
|
||||
static StaticRefPtr<GeckoMediaPluginService> sSingletonService;
|
||||
|
||||
class GMPServiceCreateHelper final : public nsRunnable
|
||||
{
|
||||
nsRefPtr<GoannaMediaPluginService> mService;
|
||||
nsRefPtr<GeckoMediaPluginService> mService;
|
||||
|
||||
public:
|
||||
static already_AddRefed<GoannaMediaPluginService>
|
||||
static already_AddRefed<GeckoMediaPluginService>
|
||||
GetOrCreate()
|
||||
{
|
||||
nsRefPtr<GoannaMediaPluginService> service;
|
||||
nsRefPtr<GeckoMediaPluginService> service;
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
service = GetOrCreateOnMainThread();
|
||||
@@ -103,14 +103,14 @@ private:
|
||||
MOZ_ASSERT(!mService);
|
||||
}
|
||||
|
||||
static already_AddRefed<GoannaMediaPluginService>
|
||||
static already_AddRefed<GeckoMediaPluginService>
|
||||
GetOrCreateOnMainThread()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
nsRefPtr<GoannaMediaPluginService> service = sSingletonService.get();
|
||||
nsRefPtr<GeckoMediaPluginService> service = sSingletonService.get();
|
||||
if (!service) {
|
||||
service = new GoannaMediaPluginService();
|
||||
service = new GeckoMediaPluginService();
|
||||
service->Init();
|
||||
|
||||
sSingletonService = service;
|
||||
@@ -130,19 +130,19 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
already_AddRefed<GoannaMediaPluginService>
|
||||
GoannaMediaPluginService::GetGoannaMediaPluginService()
|
||||
already_AddRefed<GeckoMediaPluginService>
|
||||
GeckoMediaPluginService::GetGeckoMediaPluginService()
|
||||
{
|
||||
return GMPServiceCreateHelper::GetOrCreate();
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(GoannaMediaPluginService, mozIGoannaMediaPluginService, nsIObserver)
|
||||
NS_IMPL_ISUPPORTS(GeckoMediaPluginService, mozIGeckoMediaPluginService, nsIObserver)
|
||||
|
||||
static int32_t sMaxAsyncShutdownWaitMs = 0;
|
||||
static bool sHaveSetTimeoutPrefCache = false;
|
||||
|
||||
GoannaMediaPluginService::GoannaMediaPluginService()
|
||||
: mMutex("GoannaMediaPluginService::mMutex")
|
||||
GeckoMediaPluginService::GeckoMediaPluginService()
|
||||
: mMutex("GeckoMediaPluginService::mMutex")
|
||||
, mShuttingDown(false)
|
||||
, mShuttingDownOnGMPThread(false)
|
||||
, mScannedPluginOnDisk(false)
|
||||
@@ -157,21 +157,21 @@ GoannaMediaPluginService::GoannaMediaPluginService()
|
||||
}
|
||||
}
|
||||
|
||||
GoannaMediaPluginService::~GoannaMediaPluginService()
|
||||
GeckoMediaPluginService::~GeckoMediaPluginService()
|
||||
{
|
||||
MOZ_ASSERT(mPlugins.IsEmpty());
|
||||
MOZ_ASSERT(mAsyncShutdownPlugins.IsEmpty());
|
||||
}
|
||||
|
||||
int32_t
|
||||
GoannaMediaPluginService::AsyncShutdownTimeoutMs()
|
||||
GeckoMediaPluginService::AsyncShutdownTimeoutMs()
|
||||
{
|
||||
MOZ_ASSERT(sHaveSetTimeoutPrefCache);
|
||||
return sMaxAsyncShutdownWaitMs;
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::RemoveObsoletePluginCrashCallbacks()
|
||||
GeckoMediaPluginService::RemoveObsoletePluginCrashCallbacks()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
for (size_t i = mPluginCrashCallbacks.Length(); i != 0; --i) {
|
||||
@@ -186,7 +186,7 @@ GoannaMediaPluginService::RemoveObsoletePluginCrashCallbacks()
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::AddPluginCrashCallback(
|
||||
GeckoMediaPluginService::AddPluginCrashCallback(
|
||||
nsRefPtr<PluginCrashCallback> aPluginCrashCallback)
|
||||
{
|
||||
RemoveObsoletePluginCrashCallbacks();
|
||||
@@ -194,7 +194,7 @@ GoannaMediaPluginService::AddPluginCrashCallback(
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::RemovePluginCrashCallbacks(const nsACString& aPluginId)
|
||||
GeckoMediaPluginService::RemovePluginCrashCallbacks(const nsACString& aPluginId)
|
||||
{
|
||||
RemoveObsoletePluginCrashCallbacks();
|
||||
for (size_t i = mPluginCrashCallbacks.Length(); i != 0; --i) {
|
||||
@@ -206,7 +206,7 @@ GoannaMediaPluginService::RemovePluginCrashCallbacks(const nsACString& aPluginId
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::RunPluginCrashCallbacks(const nsACString& aPluginId,
|
||||
GeckoMediaPluginService::RunPluginCrashCallbacks(const nsACString& aPluginId,
|
||||
const nsACString& aPluginName,
|
||||
const nsAString& aPluginDumpId)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ GoannaMediaPluginService::RunPluginCrashCallbacks(const nsACString& aPluginId,
|
||||
}
|
||||
|
||||
nsresult
|
||||
GoannaMediaPluginService::Init()
|
||||
GeckoMediaPluginService::Init()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
@@ -253,8 +253,8 @@ GoannaMediaPluginService::Init()
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
// Directory service is main thread only, so cache the profile dir here
|
||||
// so that we can use it off main thread.
|
||||
// We only do this on non-B2G, as this fails in multi-process Goanna.
|
||||
// TODO: Make this work in multi-process Goanna.
|
||||
// We only do this on non-B2G, as this fails in multi-process Gecko.
|
||||
// TODO: Make this work in multi-process Gecko.
|
||||
nsresult rv = NS_GetSpecialDirectory(NS_APP_USER_PROFILE_50_DIR, getter_AddRefs(mStorageBaseDir));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
@@ -277,7 +277,7 @@ GoannaMediaPluginService::Init()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
GeckoMediaPluginService::Observe(nsISupports* aSubject,
|
||||
const char* aTopic,
|
||||
const char16_t* aSomeData)
|
||||
{
|
||||
@@ -297,7 +297,7 @@ GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
gmpThread = mGMPThread;
|
||||
}
|
||||
if (gmpThread) {
|
||||
gmpThread->Dispatch(WrapRunnable(this, &GoannaMediaPluginService::CrashPlugins),
|
||||
gmpThread->Dispatch(WrapRunnable(this, &GeckoMediaPluginService::CrashPlugins),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
}
|
||||
@@ -356,7 +356,7 @@ GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
|
||||
if (gmpThread) {
|
||||
gmpThread->Dispatch(
|
||||
NS_NewRunnableMethod(this, &GoannaMediaPluginService::UnloadPlugins),
|
||||
NS_NewRunnableMethod(this, &GeckoMediaPluginService::UnloadPlugins),
|
||||
NS_DISPATCH_NORMAL);
|
||||
} else {
|
||||
MOZ_ASSERT(mPlugins.IsEmpty());
|
||||
@@ -374,7 +374,7 @@ GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
// XXX The content process never gets profile-change-teardown, so mShuttingDown
|
||||
// will always be false here. GMPService needs to be proxied to the parent.
|
||||
// See bug 1057908.
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GoannaProcessType_Default || mShuttingDown);
|
||||
MOZ_ASSERT(XRE_GetProcessType() != GeckoProcessType_Default || mShuttingDown);
|
||||
mGMPThread.swap(gmpThread);
|
||||
}
|
||||
|
||||
@@ -392,7 +392,7 @@ GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
// Clear everything!
|
||||
if (!aSomeData || nsDependentString(aSomeData).IsEmpty()) {
|
||||
return GMPDispatch(NS_NewRunnableMethod(
|
||||
this, &GoannaMediaPluginService::ClearStorage));
|
||||
this, &GeckoMediaPluginService::ClearStorage));
|
||||
}
|
||||
|
||||
// Clear nodeIds/records modified after |t|.
|
||||
@@ -402,14 +402,14 @@ GoannaMediaPluginService::Observe(nsISupports* aSubject,
|
||||
return rv;
|
||||
}
|
||||
return GMPDispatch(NS_NewRunnableMethodWithArg<PRTime>(
|
||||
this, &GoannaMediaPluginService::ClearRecentHistoryOnGMPThread, t));
|
||||
this, &GeckoMediaPluginService::ClearRecentHistoryOnGMPThread, t));
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
GoannaMediaPluginService::GMPDispatch(nsIRunnable* event, uint32_t flags)
|
||||
GeckoMediaPluginService::GMPDispatch(nsIRunnable* event, uint32_t flags)
|
||||
{
|
||||
nsCOMPtr<nsIRunnable> r(event);
|
||||
nsCOMPtr<nsIThread> thread;
|
||||
@@ -422,7 +422,7 @@ GoannaMediaPluginService::GMPDispatch(nsIRunnable* event, uint32_t flags)
|
||||
|
||||
// always call with getter_AddRefs, because it does
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetThread(nsIThread** aThread)
|
||||
GeckoMediaPluginService::GetThread(nsIThread** aThread)
|
||||
{
|
||||
MOZ_ASSERT(aThread);
|
||||
|
||||
@@ -441,7 +441,7 @@ GoannaMediaPluginService::GetThread(nsIThread** aThread)
|
||||
}
|
||||
|
||||
// Tell the thread to initialize plugins
|
||||
mGMPThread->Dispatch(NS_NewRunnableMethod(this, &GoannaMediaPluginService::LoadFromEnvironment), NS_DISPATCH_NORMAL);
|
||||
mGMPThread->Dispatch(NS_NewRunnableMethod(this, &GeckoMediaPluginService::LoadFromEnvironment), NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
NS_ADDREF(mGMPThread);
|
||||
@@ -451,7 +451,7 @@ GoannaMediaPluginService::GetThread(nsIThread** aThread)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetGMPAudioDecoder(nsTArray<nsCString>* aTags,
|
||||
GeckoMediaPluginService::GetGMPAudioDecoder(nsTArray<nsCString>* aTags,
|
||||
const nsACString& aNodeId,
|
||||
GMPAudioDecoderProxy** aGMPAD)
|
||||
{
|
||||
@@ -482,7 +482,7 @@ GoannaMediaPluginService::GetGMPAudioDecoder(nsTArray<nsCString>* aTags,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetGMPVideoDecoder(nsTArray<nsCString>* aTags,
|
||||
GeckoMediaPluginService::GetGMPVideoDecoder(nsTArray<nsCString>* aTags,
|
||||
const nsACString& aNodeId,
|
||||
GMPVideoHost** aOutVideoHost,
|
||||
GMPVideoDecoderProxy** aGMPVD)
|
||||
@@ -521,7 +521,7 @@ GoannaMediaPluginService::GetGMPVideoDecoder(nsTArray<nsCString>* aTags,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetGMPVideoEncoder(nsTArray<nsCString>* aTags,
|
||||
GeckoMediaPluginService::GetGMPVideoEncoder(nsTArray<nsCString>* aTags,
|
||||
const nsACString& aNodeId,
|
||||
GMPVideoHost** aOutVideoHost,
|
||||
GMPVideoEncoderProxy** aGMPVE)
|
||||
@@ -559,13 +559,13 @@ GoannaMediaPluginService::GetGMPVideoEncoder(nsTArray<nsCString>* aTags,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetGMPDecryptor(nsTArray<nsCString>* aTags,
|
||||
GeckoMediaPluginService::GetGMPDecryptor(nsTArray<nsCString>* aTags,
|
||||
const nsACString& aNodeId,
|
||||
GMPDecryptorProxy** aDecryptor)
|
||||
{
|
||||
#if defined(XP_LINUX) && defined(MOZ_GMP_SANDBOX)
|
||||
if (!SandboxInfo::Get().CanSandboxMedia()) {
|
||||
NS_WARNING("GoannaMediaPluginService::GetGMPDecryptor: "
|
||||
NS_WARNING("GeckoMediaPluginService::GetGMPDecryptor: "
|
||||
"EME decryption not available without sandboxing support.");
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
@@ -606,7 +606,7 @@ GoannaMediaPluginService::GetGMPDecryptor(nsTArray<nsCString>* aTags,
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::AsyncShutdownNeeded(GMPParent* aParent)
|
||||
GeckoMediaPluginService::AsyncShutdownNeeded(GMPParent* aParent)
|
||||
{
|
||||
LOGD(("%s::%s %p", __CLASS__, __FUNCTION__, aParent));
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
@@ -616,7 +616,7 @@ GoannaMediaPluginService::AsyncShutdownNeeded(GMPParent* aParent)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::AsyncShutdownComplete(GMPParent* aParent)
|
||||
GeckoMediaPluginService::AsyncShutdownComplete(GMPParent* aParent)
|
||||
{
|
||||
LOGD(("%s::%s %p", __CLASS__, __FUNCTION__, aParent));
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
@@ -626,20 +626,20 @@ GoannaMediaPluginService::AsyncShutdownComplete(GMPParent* aParent)
|
||||
// The main thread may be waiting for async shutdown of plugins,
|
||||
// which has completed. Break the main thread out of its waiting loop.
|
||||
nsCOMPtr<nsIRunnable> task(NS_NewRunnableMethod(
|
||||
this, &GoannaMediaPluginService::SetAsyncShutdownComplete));
|
||||
this, &GeckoMediaPluginService::SetAsyncShutdownComplete));
|
||||
NS_DispatchToMainThread(task);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::SetAsyncShutdownComplete()
|
||||
GeckoMediaPluginService::SetAsyncShutdownComplete()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
mWaitingForPluginsAsyncShutdown = false;
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::UnloadPlugins()
|
||||
GeckoMediaPluginService::UnloadPlugins()
|
||||
{
|
||||
LOGD(("%s::%s async_shutdown=%d", __CLASS__, __FUNCTION__,
|
||||
mAsyncShutdownPlugins.Length()));
|
||||
@@ -660,13 +660,13 @@ GoannaMediaPluginService::UnloadPlugins()
|
||||
|
||||
if (mAsyncShutdownPlugins.IsEmpty()) {
|
||||
nsCOMPtr<nsIRunnable> task(NS_NewRunnableMethod(
|
||||
this, &GoannaMediaPluginService::SetAsyncShutdownComplete));
|
||||
this, &GeckoMediaPluginService::SetAsyncShutdownComplete));
|
||||
NS_DispatchToMainThread(task);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::CrashPlugins()
|
||||
GeckoMediaPluginService::CrashPlugins()
|
||||
{
|
||||
LOGD(("%s::%s", __CLASS__, __FUNCTION__));
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
@@ -678,7 +678,7 @@ GoannaMediaPluginService::CrashPlugins()
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::LoadFromEnvironment()
|
||||
GeckoMediaPluginService::LoadFromEnvironment()
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
|
||||
@@ -710,7 +710,7 @@ GoannaMediaPluginService::LoadFromEnvironment()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::PathRunnable::Run()
|
||||
GeckoMediaPluginService::PathRunnable::Run()
|
||||
{
|
||||
if (mOperation == ADD) {
|
||||
mService->AddOnGMPThread(mPath);
|
||||
@@ -723,7 +723,7 @@ GoannaMediaPluginService::PathRunnable::Run()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::AddPluginDirectory(const nsAString& aDirectory)
|
||||
GeckoMediaPluginService::AddPluginDirectory(const nsAString& aDirectory)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return GMPDispatch(new PathRunnable(this, aDirectory,
|
||||
@@ -731,7 +731,7 @@ GoannaMediaPluginService::AddPluginDirectory(const nsAString& aDirectory)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::RemovePluginDirectory(const nsAString& aDirectory)
|
||||
GeckoMediaPluginService::RemovePluginDirectory(const nsAString& aDirectory)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return GMPDispatch(new PathRunnable(this, aDirectory,
|
||||
@@ -739,7 +739,7 @@ GoannaMediaPluginService::RemovePluginDirectory(const nsAString& aDirectory)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::RemoveAndDeletePluginDirectory(
|
||||
GeckoMediaPluginService::RemoveAndDeletePluginDirectory(
|
||||
const nsAString& aDirectory, const bool aDefer)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
@@ -755,7 +755,7 @@ public:
|
||||
};
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
GeckoMediaPluginService::GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
nsACString& aOutVersion)
|
||||
{
|
||||
@@ -794,7 +794,7 @@ GoannaMediaPluginService::GetPluginVersionForAPI(const nsACString& aAPI,
|
||||
}
|
||||
|
||||
nsresult
|
||||
GoannaMediaPluginService::EnsurePluginsOnDiskScanned()
|
||||
GeckoMediaPluginService::EnsurePluginsOnDiskScanned()
|
||||
{
|
||||
const char* env = nullptr;
|
||||
if (!mScannedPluginOnDisk && (env = PR_GetEnv("MOZ_GMP_PATH")) && *env) {
|
||||
@@ -813,7 +813,7 @@ GoannaMediaPluginService::EnsurePluginsOnDiskScanned()
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::HasPluginForAPI(const nsACString& aAPI,
|
||||
GeckoMediaPluginService::HasPluginForAPI(const nsACString& aAPI,
|
||||
nsTArray<nsCString>* aTags,
|
||||
bool* aOutHavePlugin)
|
||||
{
|
||||
@@ -837,7 +837,7 @@ GoannaMediaPluginService::HasPluginForAPI(const nsACString& aAPI,
|
||||
}
|
||||
|
||||
GMPParent*
|
||||
GoannaMediaPluginService::FindPluginForAPIFrom(size_t aSearchStartIndex,
|
||||
GeckoMediaPluginService::FindPluginForAPIFrom(size_t aSearchStartIndex,
|
||||
const nsCString& aAPI,
|
||||
const nsTArray<nsCString>& aTags,
|
||||
size_t* aOutPluginIndex)
|
||||
@@ -865,7 +865,7 @@ GoannaMediaPluginService::FindPluginForAPIFrom(size_t aSearchStartIndex,
|
||||
}
|
||||
|
||||
GMPParent*
|
||||
GoannaMediaPluginService::SelectPluginForAPI(const nsACString& aNodeId,
|
||||
GeckoMediaPluginService::SelectPluginForAPI(const nsACString& aNodeId,
|
||||
const nsCString& aAPI,
|
||||
const nsTArray<nsCString>& aTags)
|
||||
{
|
||||
@@ -941,7 +941,7 @@ private:
|
||||
};
|
||||
|
||||
GMPParent*
|
||||
GoannaMediaPluginService::ClonePlugin(const GMPParent* aOriginal)
|
||||
GeckoMediaPluginService::ClonePlugin(const GMPParent* aOriginal)
|
||||
{
|
||||
MOZ_ASSERT(aOriginal);
|
||||
|
||||
@@ -988,7 +988,7 @@ private:
|
||||
};
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::AddOnGMPThread(const nsAString& aDirectory)
|
||||
GeckoMediaPluginService::AddOnGMPThread(const nsAString& aDirectory)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s: %s", __CLASS__, __FUNCTION__, NS_LossyConvertUTF16toASCII(aDirectory).get()));
|
||||
@@ -1021,7 +1021,7 @@ GoannaMediaPluginService::AddOnGMPThread(const nsAString& aDirectory)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::RemoveOnGMPThread(const nsAString& aDirectory,
|
||||
GeckoMediaPluginService::RemoveOnGMPThread(const nsAString& aDirectory,
|
||||
const bool aDeleteFromDisk,
|
||||
const bool aCanDefer)
|
||||
{
|
||||
@@ -1076,7 +1076,7 @@ static void Dummy(nsRefPtr<GMPParent>& aOnDeathsDoor)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::PluginTerminated(const nsRefPtr<GMPParent>& aPlugin)
|
||||
GeckoMediaPluginService::PluginTerminated(const nsRefPtr<GMPParent>& aPlugin)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
|
||||
@@ -1094,7 +1094,7 @@ GoannaMediaPluginService::PluginTerminated(const nsRefPtr<GMPParent>& aPlugin)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::ReAddOnGMPThread(const nsRefPtr<GMPParent>& aOld)
|
||||
GeckoMediaPluginService::ReAddOnGMPThread(const nsRefPtr<GMPParent>& aOld)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s: %p", __CLASS__, __FUNCTION__, (void*) aOld));
|
||||
@@ -1116,7 +1116,7 @@ GoannaMediaPluginService::ReAddOnGMPThread(const nsRefPtr<GMPParent>& aOld)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetStorageDir(nsIFile** aOutFile)
|
||||
GeckoMediaPluginService::GetStorageDir(nsIFile** aOutFile)
|
||||
{
|
||||
#ifndef MOZ_WIDGET_GONK
|
||||
if (NS_WARN_IF(!mStorageBaseDir)) {
|
||||
@@ -1208,7 +1208,7 @@ ReadSalt(nsIFile* aPath, nsACString& aOutData)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::IsPersistentStorageAllowed(const nsACString& aNodeId,
|
||||
GeckoMediaPluginService::IsPersistentStorageAllowed(const nsACString& aNodeId,
|
||||
bool* aOutAllowed)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
@@ -1218,7 +1218,7 @@ GoannaMediaPluginService::IsPersistentStorageAllowed(const nsACString& aNodeId,
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
||||
GeckoMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
||||
const nsAString& aTopLevelOrigin,
|
||||
bool aInPrivateBrowsing,
|
||||
nsACString& aOutId)
|
||||
@@ -1230,7 +1230,7 @@ GoannaMediaPluginService::GetNodeId(const nsAString& aOrigin,
|
||||
(aInPrivateBrowsing ? "PrivateBrowsing" : "NonPrivateBrowsing")));
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_WARNING("GoannaMediaPluginService::GetNodeId Not implemented on B2G");
|
||||
NS_WARNING("GeckoMediaPluginService::GetNodeId Not implemented on B2G");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
#endif
|
||||
|
||||
@@ -1464,7 +1464,7 @@ private:
|
||||
};
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::ClearNodeIdAndPlugin(DirectoryFilter& aFilter)
|
||||
GeckoMediaPluginService::ClearNodeIdAndPlugin(DirectoryFilter& aFilter)
|
||||
{
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIFile> path;
|
||||
@@ -1560,7 +1560,7 @@ GoannaMediaPluginService::ClearNodeIdAndPlugin(DirectoryFilter& aFilter)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::ForgetThisSiteOnGMPThread(const nsACString& aSite)
|
||||
GeckoMediaPluginService::ForgetThisSiteOnGMPThread(const nsACString& aSite)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s: origin=%s", __CLASS__, __FUNCTION__, aSite.Data()));
|
||||
@@ -1578,7 +1578,7 @@ GoannaMediaPluginService::ForgetThisSiteOnGMPThread(const nsACString& aSite)
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::ClearRecentHistoryOnGMPThread(PRTime aSince)
|
||||
GeckoMediaPluginService::ClearRecentHistoryOnGMPThread(PRTime aSince)
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s: since=%lld", __CLASS__, __FUNCTION__, (int64_t)aSince));
|
||||
@@ -1665,11 +1665,11 @@ GoannaMediaPluginService::ClearRecentHistoryOnGMPThread(PRTime aSince)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
GoannaMediaPluginService::ForgetThisSite(const nsAString& aSite)
|
||||
GeckoMediaPluginService::ForgetThisSite(const nsAString& aSite)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return GMPDispatch(NS_NewRunnableMethodWithArg<nsCString>(
|
||||
this, &GoannaMediaPluginService::ForgetThisSiteOnGMPThread,
|
||||
this, &GeckoMediaPluginService::ForgetThisSiteOnGMPThread,
|
||||
NS_ConvertUTF16toUTF8(aSite)));
|
||||
}
|
||||
|
||||
@@ -1678,13 +1678,13 @@ static bool IsNodeIdValid(GMPParent* aParent) {
|
||||
}
|
||||
|
||||
void
|
||||
GoannaMediaPluginService::ClearStorage()
|
||||
GeckoMediaPluginService::ClearStorage()
|
||||
{
|
||||
MOZ_ASSERT(NS_GetCurrentThread() == mGMPThread);
|
||||
LOGD(("%s::%s", __CLASS__, __FUNCTION__));
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
NS_WARNING("GoannaMediaPluginService::ClearStorage not implemented on B2G");
|
||||
NS_WARNING("GeckoMediaPluginService::ClearStorage not implemented on B2G");
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#define GMPService_h_
|
||||
|
||||
#include "nsString.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsTArray.h"
|
||||
#include "mozilla/Attributes.h"
|
||||
@@ -30,17 +30,17 @@ class GMPParent;
|
||||
|
||||
#define GMP_DEFAULT_ASYNC_SHUTDONW_TIMEOUT 3000
|
||||
|
||||
class GoannaMediaPluginService final : public mozIGoannaMediaPluginService
|
||||
, public nsIObserver
|
||||
class GeckoMediaPluginService final : public mozIGeckoMediaPluginService
|
||||
, public nsIObserver
|
||||
{
|
||||
public:
|
||||
static already_AddRefed<GoannaMediaPluginService> GetGoannaMediaPluginService();
|
||||
static already_AddRefed<GeckoMediaPluginService> GetGeckoMediaPluginService();
|
||||
|
||||
GoannaMediaPluginService();
|
||||
GeckoMediaPluginService();
|
||||
nsresult Init();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_MOZIGOANNAMEDIAPLUGINSERVICE
|
||||
NS_DECL_MOZIGECKOMEDIAPLUGINSERVICE
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
||||
void AsyncShutdownNeeded(GMPParent* aParent);
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
const nsAString& aPluginDumpId);
|
||||
|
||||
private:
|
||||
~GoannaMediaPluginService();
|
||||
~GeckoMediaPluginService();
|
||||
|
||||
nsresult GMPDispatch(nsIRunnable* event, uint32_t flags = NS_DISPATCH_NORMAL);
|
||||
|
||||
@@ -132,7 +132,7 @@ private:
|
||||
REMOVE_AND_DELETE_FROM_DISK,
|
||||
};
|
||||
|
||||
PathRunnable(GoannaMediaPluginService* aService, const nsAString& aPath,
|
||||
PathRunnable(GeckoMediaPluginService* aService, const nsAString& aPath,
|
||||
EOperation aOperation, bool aDefer = false)
|
||||
: mService(aService)
|
||||
, mPath(aPath)
|
||||
@@ -143,7 +143,7 @@ private:
|
||||
NS_DECL_NSIRUNNABLE
|
||||
|
||||
private:
|
||||
nsRefPtr<GoannaMediaPluginService> mService;
|
||||
nsRefPtr<GeckoMediaPluginService> mService;
|
||||
nsString mPath;
|
||||
EOperation mOperation;
|
||||
bool mDefer;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "nsTHashtable.h"
|
||||
#include "nsDataHashtable.h"
|
||||
#include "prio.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "nsContentCID.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
@@ -52,8 +52,8 @@ GetGMPStorageDir(nsIFile** aTempDir, const nsCString& aNodeId)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
}
|
||||
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mps =
|
||||
do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mps =
|
||||
do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
if (NS_WARN_IF(!mps)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
@@ -468,8 +468,8 @@ GMPStorageParent::Init()
|
||||
if (NS_WARN_IF(mNodeId.IsEmpty())) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mps =
|
||||
do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mps =
|
||||
do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
if (NS_WARN_IF(!mps)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
XPIDL_MODULE = 'content_goannamediaplugins'
|
||||
XPIDL_MODULE = 'content_geckomediaplugins'
|
||||
|
||||
XPIDL_SOURCES += [
|
||||
'mozIGoannaMediaPluginService.idl',
|
||||
'mozIGeckoMediaPluginService.idl',
|
||||
]
|
||||
|
||||
EXPORTS += [
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ class GMPVideoHost;
|
||||
[ptr] native GMPAudioDecoderProxy(GMPAudioDecoderProxy);
|
||||
|
||||
[scriptable, uuid(46c7cd80-a19d-49e7-a147-ca314ad8d8b0)]
|
||||
interface mozIGoannaMediaPluginService : nsISupports
|
||||
interface mozIGeckoMediaPluginService : nsISupports
|
||||
{
|
||||
|
||||
/**
|
||||
@@ -92,7 +92,7 @@ interface mozIGoannaMediaPluginService : nsISupports
|
||||
void addPluginDirectory(in AString directory);
|
||||
|
||||
/**
|
||||
* Remove a directory for goanna media plugins.
|
||||
* Remove a directory for gecko media plugins.
|
||||
* @note Main-thread API.
|
||||
*/
|
||||
void removePluginDirectory(in AString directory);
|
||||
@@ -4,7 +4,7 @@
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
#include "OggWriter.h"
|
||||
#include "prtime.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
#undef LOG
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace mozilla {
|
||||
#if defined(DEBUG)
|
||||
bool IsOnGMPThread()
|
||||
{
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mps = do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mps = do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
MOZ_ASSERT(mps);
|
||||
|
||||
nsCOMPtr<nsIThread> gmpThread;
|
||||
@@ -138,7 +138,7 @@ GMPAudioDecoder::Init()
|
||||
{
|
||||
MOZ_ASSERT(IsOnGMPThread());
|
||||
|
||||
mMPS = do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
mMPS = do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
MOZ_ASSERT(mMPS);
|
||||
|
||||
nsTArray<nsCString> tags;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "GMPAudioDecoderProxy.h"
|
||||
#include "MediaDataDecoderProxy.h"
|
||||
#include "PlatformDecoderModule.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@@ -82,7 +82,7 @@ protected:
|
||||
private:
|
||||
const AudioInfo& mConfig;
|
||||
MediaDataDecoderCallbackProxy* mCallback;
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mMPS;
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mMPS;
|
||||
GMPAudioDecoderProxy* mGMP;
|
||||
nsAutoPtr<AudioCallbackAdapter> mAdapter;
|
||||
};
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include "GMPAudioDecoder.h"
|
||||
#include "GMPVideoDecoder.h"
|
||||
#include "MediaDataDecoderProxy.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "nsServiceManagerUtils.h"
|
||||
|
||||
namespace mozilla {
|
||||
@@ -24,7 +24,7 @@ GMPDecoderModule::~GMPDecoderModule()
|
||||
static already_AddRefed<MediaDataDecoderProxy>
|
||||
CreateDecoderWrapper(MediaDataDecoderCallback* aCallback)
|
||||
{
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> gmpService = do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> gmpService = do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
if (!gmpService) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ GMPVideoDecoder::Init()
|
||||
{
|
||||
MOZ_ASSERT(IsOnGMPThread());
|
||||
|
||||
mMPS = do_GetService("@mozilla.org/goanna-media-plugin-service;1");
|
||||
mMPS = do_GetService("@mozilla.org/gecko-media-plugin-service;1");
|
||||
MOZ_ASSERT(mMPS);
|
||||
|
||||
nsTArray<nsCString> tags;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "ImageContainer.h"
|
||||
#include "MediaDataDecoderProxy.h"
|
||||
#include "PlatformDecoderModule.h"
|
||||
#include "mozIGoannaMediaPluginService.h"
|
||||
#include "mozIGeckoMediaPluginService.h"
|
||||
#include "MediaInfo.h"
|
||||
|
||||
namespace mozilla {
|
||||
@@ -98,7 +98,7 @@ protected:
|
||||
private:
|
||||
const VideoInfo& mConfig;
|
||||
MediaDataDecoderCallbackProxy* mCallback;
|
||||
nsCOMPtr<mozIGoannaMediaPluginService> mMPS;
|
||||
nsCOMPtr<mozIGeckoMediaPluginService> mMPS;
|
||||
GMPVideoDecoderProxy* mGMP;
|
||||
GMPVideoHost* mHost;
|
||||
nsAutoPtr<VideoCallbackAdapter> mAdapter;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "WebMWriter.h"
|
||||
#include "EbmlComposer.h"
|
||||
#include "GoannaProfiler.h"
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ NS_IMETHODIMP
|
||||
nsSpeechTask::Setup(nsISpeechTaskCallback* aCallback,
|
||||
uint32_t aChannels, uint32_t aRate, uint8_t argc)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
LOG(PR_LOG_DEBUG, ("nsSpeechTask::Setup"));
|
||||
|
||||
@@ -180,7 +180,7 @@ NS_IMETHODIMP
|
||||
nsSpeechTask::SendAudio(JS::Handle<JS::Value> aData, JS::Handle<JS::Value> aLandmarks,
|
||||
JSContext* aCx)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
NS_ENSURE_TRUE(mStream, NS_ERROR_NOT_AVAILABLE);
|
||||
NS_ENSURE_FALSE(mStream->IsDestroyed(), NS_ERROR_NOT_AVAILABLE);
|
||||
@@ -222,7 +222,7 @@ nsSpeechTask::SendAudio(JS::Handle<JS::Value> aData, JS::Handle<JS::Value> aLand
|
||||
NS_IMETHODIMP
|
||||
nsSpeechTask::SendAudioNative(int16_t* aData, uint32_t aDataLen)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
NS_ENSURE_TRUE(mStream, NS_ERROR_NOT_AVAILABLE);
|
||||
NS_ENSURE_FALSE(mStream->IsDestroyed(), NS_ERROR_NOT_AVAILABLE);
|
||||
@@ -459,7 +459,7 @@ nsSpeechTask::DispatchMarkImpl(const nsAString& aName,
|
||||
void
|
||||
nsSpeechTask::Pause()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
if (mUtterance->IsPaused() ||
|
||||
mUtterance->GetState() == SpeechSynthesisUtterance::STATE_ENDED) {
|
||||
@@ -481,7 +481,7 @@ nsSpeechTask::Pause()
|
||||
void
|
||||
nsSpeechTask::Resume()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
if (!mUtterance->IsPaused()) {
|
||||
return;
|
||||
@@ -502,7 +502,7 @@ nsSpeechTask::Resume()
|
||||
void
|
||||
nsSpeechTask::Cancel()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
LOG(PR_LOG_DEBUG, ("nsSpeechTask::Cancel"));
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ NS_IMPL_ISUPPORTS(nsSynthVoiceRegistry, nsISynthVoiceRegistry)
|
||||
nsSynthVoiceRegistry::nsSynthVoiceRegistry()
|
||||
: mSpeechSynthChild(nullptr)
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
|
||||
mSpeechSynthChild = new SpeechSynthesisChild();
|
||||
ContentChild::GetSingleton()->SendPSpeechSynthesisConstructor(mSpeechSynthChild);
|
||||
@@ -161,7 +161,7 @@ void
|
||||
nsSynthVoiceRegistry::Shutdown()
|
||||
{
|
||||
LOG(PR_LOG_DEBUG, ("[%s] nsSynthVoiceRegistry::Shutdown()",
|
||||
(XRE_GetProcessType() == GoannaProcessType_Content) ? "Content" : "Default"));
|
||||
(XRE_GetProcessType() == GeckoProcessType_Content) ? "Content" : "Default"));
|
||||
gSynthVoiceRegistry = nullptr;
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ nsSynthVoiceRegistry::AddVoice(nsISpeechService* aService,
|
||||
NS_ConvertUTF16toUTF8(aLang).get(),
|
||||
aLocalService ? "true" : "false"));
|
||||
|
||||
NS_ENSURE_FALSE(XRE_GetProcessType() == GoannaProcessType_Content,
|
||||
NS_ENSURE_FALSE(XRE_GetProcessType() == GeckoProcessType_Content,
|
||||
NS_ERROR_NOT_AVAILABLE);
|
||||
|
||||
return AddVoiceImpl(aService, aUri, aName, aLang,
|
||||
@@ -246,7 +246,7 @@ nsSynthVoiceRegistry::RemoveVoice(nsISpeechService* aService,
|
||||
LOG(PR_LOG_DEBUG,
|
||||
("nsSynthVoiceRegistry::RemoveVoice uri='%s' (%s)",
|
||||
NS_ConvertUTF16toUTF8(aUri).get(),
|
||||
(XRE_GetProcessType() == GoannaProcessType_Content) ? "child" : "parent"));
|
||||
(XRE_GetProcessType() == GeckoProcessType_Content) ? "child" : "parent"));
|
||||
|
||||
bool found = false;
|
||||
VoiceData* retval = mUriVoiceMap.GetWeak(aUri, &found);
|
||||
@@ -285,7 +285,7 @@ nsSynthVoiceRegistry::SetDefaultVoice(const nsAString& aUri,
|
||||
mDefaultVoices.AppendElement(retval);
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
nsTArray<SpeechSynthesisParent*> ssplist;
|
||||
GetAllSpeechSynthActors(ssplist);
|
||||
|
||||
@@ -517,7 +517,7 @@ nsSynthVoiceRegistry::SpeakUtterance(SpeechSynthesisUtterance& aUtterance,
|
||||
}
|
||||
|
||||
nsRefPtr<nsSpeechTask> task;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
task = new SpeechTaskChild(&aUtterance);
|
||||
SpeechSynthesisRequestChild* actor =
|
||||
new SpeechSynthesisRequestChild(static_cast<SpeechTaskChild*>(task.get()));
|
||||
|
||||
@@ -714,7 +714,7 @@ nsPicoService*
|
||||
nsPicoService::GetInstance()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
MOZ_ASSERT(false, "nsPicoService can only be started on main goanna process");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ NS_CreateMobileConnectionService()
|
||||
{
|
||||
nsCOMPtr<nsIMobileConnectionService> service;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
service = new mozilla::dom::mobileconnection::MobileConnectionIPCService();
|
||||
} else {
|
||||
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
|
||||
@@ -705,7 +705,7 @@ NS_CreateSmsService()
|
||||
{
|
||||
nsCOMPtr<nsISmsService> smsService;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
smsService = SmsIPCService::GetSingleton();
|
||||
} else {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
@@ -722,7 +722,7 @@ already_AddRefed<nsIMobileMessageDatabaseService>
|
||||
NS_CreateMobileMessageDatabaseService()
|
||||
{
|
||||
nsCOMPtr<nsIMobileMessageDatabaseService> mobileMessageDBService;
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mobileMessageDBService = SmsIPCService::GetSingleton();
|
||||
} else {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
@@ -741,7 +741,7 @@ NS_CreateMmsService()
|
||||
{
|
||||
nsCOMPtr<nsIMmsService> mmsService;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
mmsService = SmsIPCService::GetSingleton();
|
||||
} else {
|
||||
#if defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
|
||||
@@ -555,7 +555,7 @@ UDPSocket::Init(const nsString& aLocalAddress,
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
rv = mSocket->InitRemote(mSocket->mLocalAddress, localPort);
|
||||
} else {
|
||||
rv = mSocket->InitLocal(mSocket->mLocalAddress, localPort);
|
||||
|
||||
@@ -270,7 +270,7 @@ NfcService::~NfcService()
|
||||
already_AddRefed<NfcService>
|
||||
NfcService::FactoryCreate()
|
||||
{
|
||||
if (XRE_GetProcessType() != GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() != GeckoProcessType_Default) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#include "nsXULAppAPI.h"
|
||||
#define IS_CHILD_PROCESS() \
|
||||
(GoannaProcessType_Default != XRE_GetProcessType())
|
||||
(GeckoProcessType_Default != XRE_GetProcessType())
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
|
||||
@@ -247,7 +247,7 @@ nsNPAPIPlugin::PluginCrashed(const nsAString& pluginDumpID,
|
||||
bool
|
||||
nsNPAPIPlugin::RunPluginOOP(const nsPluginTag *aPluginTag)
|
||||
{
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ GetNewPluginLibrary(nsPluginTag *aPluginTag)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return PluginModuleContentParent::LoadModule(aPluginTag->mId);
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ nsPluginHost::nsPluginHost()
|
||||
// good plugin list the first time it requests it. Normally we'd just
|
||||
// init this to 1, but due to the unique nature of our ctor we need to do
|
||||
// this manually.
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
IncrementChromeEpoch();
|
||||
}
|
||||
|
||||
@@ -1256,7 +1256,7 @@ nsresult nsPluginHost::EnsurePluginLoaded(nsPluginTag* aPluginTag)
|
||||
nsresult
|
||||
nsPluginHost::GetPluginForContentProcess(uint32_t aPluginId, nsNPAPIPlugin** aPlugin)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
// If plugins haven't been scanned yet, do so now
|
||||
LoadPlugins();
|
||||
@@ -1314,7 +1314,7 @@ protected:
|
||||
void
|
||||
nsPluginHost::NotifyContentModuleDestroyed(uint32_t aPluginId)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
// This is called in response to a message from the plugin. Don't unload the
|
||||
// plugin until the message handler is off the stack.
|
||||
@@ -1820,7 +1820,7 @@ nsresult nsPluginHost::ScanPluginsDirectory(nsIFile *pluginsDir,
|
||||
bool aCreatePluginList,
|
||||
bool *aPluginsChanged)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
NS_ENSURE_ARG_POINTER(aPluginsChanged);
|
||||
nsresult rv;
|
||||
@@ -2027,7 +2027,7 @@ nsresult nsPluginHost::ScanPluginsDirectoryList(nsISimpleEnumerator *dirEnum,
|
||||
bool aCreatePluginList,
|
||||
bool *aPluginsChanged)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
bool hasMore;
|
||||
while (NS_SUCCEEDED(dirEnum->HasMoreElements(&hasMore)) && hasMore) {
|
||||
@@ -2056,28 +2056,28 @@ nsresult nsPluginHost::ScanPluginsDirectoryList(nsISimpleEnumerator *dirEnum,
|
||||
void
|
||||
nsPluginHost::IncrementChromeEpoch()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
mPluginEpoch++;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nsPluginHost::ChromeEpoch()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
return mPluginEpoch;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
nsPluginHost::ChromeEpochForContent()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Content);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Content);
|
||||
return mPluginEpoch;
|
||||
}
|
||||
|
||||
void
|
||||
nsPluginHost::SetChromeEpochForContent(uint32_t aEpoch)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Content);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Content);
|
||||
mPluginEpoch = aEpoch;
|
||||
}
|
||||
|
||||
@@ -2107,7 +2107,7 @@ WatchRegKey(uint32_t aRoot, nsCOMPtr<nsIWindowsRegKey>& aKey)
|
||||
nsresult nsPluginHost::LoadPlugins()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return NS_OK;
|
||||
}
|
||||
#endif
|
||||
@@ -2131,7 +2131,7 @@ nsresult nsPluginHost::LoadPlugins()
|
||||
|
||||
// only if plugins have changed will we notify plugin-change observers
|
||||
if (pluginschanged) {
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Default) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Default) {
|
||||
IncrementChromeEpoch();
|
||||
}
|
||||
|
||||
@@ -2147,7 +2147,7 @@ nsresult nsPluginHost::LoadPlugins()
|
||||
nsresult
|
||||
nsPluginHost::FindPluginsInContent(bool aCreatePluginList, bool* aPluginsChanged)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Content);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Content);
|
||||
|
||||
dom::ContentChild* cp = dom::ContentChild::GetSingleton();
|
||||
nsTArray<PluginTag> plugins;
|
||||
@@ -2203,7 +2203,7 @@ nsresult nsPluginHost::FindPlugins(bool aCreatePluginList, bool * aPluginsChange
|
||||
|
||||
*aPluginsChanged = false;
|
||||
|
||||
if (XRE_GetProcessType() == GoannaProcessType_Content) {
|
||||
if (XRE_GetProcessType() == GeckoProcessType_Content) {
|
||||
return FindPluginsInContent(aCreatePluginList, aPluginsChanged);
|
||||
}
|
||||
|
||||
@@ -2370,7 +2370,7 @@ mozilla::plugins::FindPluginsForContent(uint32_t aPluginEpoch,
|
||||
nsTArray<PluginTag>* aPlugins,
|
||||
uint32_t* aNewPluginEpoch)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
nsRefPtr<nsPluginHost> host = nsPluginHost::GetInst();
|
||||
host->FindPluginsForContent(aPluginEpoch, aPlugins, aNewPluginEpoch);
|
||||
@@ -2382,7 +2382,7 @@ nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
|
||||
nsTArray<PluginTag>* aPlugins,
|
||||
uint32_t* aNewPluginEpoch)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
// Load plugins so that the epoch is correct.
|
||||
LoadPlugins();
|
||||
@@ -2422,7 +2422,7 @@ nsPluginHost::FindPluginsForContent(uint32_t aPluginEpoch,
|
||||
void
|
||||
nsPluginHost::UpdatePluginInfo(nsPluginTag* aPluginTag)
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
ReadPluginInfo();
|
||||
WritePluginInfo();
|
||||
@@ -2508,7 +2508,7 @@ nsPluginHost::RegisterWithCategoryManager(nsCString &aMimeType,
|
||||
nsresult
|
||||
nsPluginHost::WritePluginInfo()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
nsCOMPtr<nsIProperties> directoryService(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,&rv));
|
||||
@@ -2653,7 +2653,7 @@ nsPluginHost::WritePluginInfo()
|
||||
nsresult
|
||||
nsPluginHost::ReadPluginInfo()
|
||||
{
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GoannaProcessType_Default);
|
||||
MOZ_ASSERT(XRE_GetProcessType() == GeckoProcessType_Default);
|
||||
|
||||
const long PLUGIN_REG_MIMETYPES_ARRAY_SIZE = 12;
|
||||
const long PLUGIN_REG_MAX_MIMETYPES = 1000;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user