diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-31 09:45:25 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-31 09:45:25 +0200 |
commit | 2d4ff8df91414b42974c72b2870f5c6e9ad397a8 (patch) | |
tree | 15b23dc6494a147e723cfdb3765be1568cf6c113 /dom/ipc/ContentParent.cpp | |
parent | f4b8be889cb7ee31a62af5660f36aaa192599009 (diff) | |
parent | 14eb8dc7bee8670e39d1199591d335579601f2ad (diff) | |
download | UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.gz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.lz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.tar.xz UXP-2d4ff8df91414b42974c72b2870f5c6e9ad397a8.zip |
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'dom/ipc/ContentParent.cpp')
-rw-r--r-- | dom/ipc/ContentParent.cpp | 151 |
1 files changed, 2 insertions, 149 deletions
diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 8b9ab4442..3488e26bd 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -22,7 +22,6 @@ #include "AppProcessChecker.h" #include "AudioChannelService.h" #include "BlobParent.h" -#include "CrashReporterParent.h" #include "GMPServiceParent.h" #include "HandlerServiceParent.h" #include "IHistory.h" @@ -82,9 +81,6 @@ #include "mozilla/Preferences.h" #include "mozilla/ProcessHangMonitor.h" #include "mozilla/ProcessHangMonitorIPC.h" -#ifdef MOZ_ENABLE_PROFILER_SPS -#include "mozilla/ProfileGatherer.h" -#endif #include "mozilla/ScopeExit.h" #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" @@ -221,11 +217,6 @@ #include "nsIBrowserSearchService.h" #endif -#ifdef MOZ_ENABLE_PROFILER_SPS -#include "nsIProfiler.h" -#include "nsIProfileSaveEvent.h" -#endif - #ifdef XP_WIN #include "mozilla/widget/AudioSession.h" #endif @@ -246,9 +237,6 @@ extern const char* kForceEnableE10sPref; using base::ChildPrivileges; using base::KillProcess; -#ifdef MOZ_ENABLE_PROFILER_SPS -using mozilla::ProfileGatherer; -#endif using namespace mozilla::dom::power; using namespace mozilla::media; @@ -516,14 +504,6 @@ static const char* sObserverTopics[] = { #ifdef ACCESSIBILITY "a11y-init-or-shutdown", #endif -#ifdef MOZ_ENABLE_PROFILER_SPS - "profiler-started", - "profiler-stopped", - "profiler-paused", - "profiler-resumed", - "profiler-subprocess-gather", - "profiler-subprocess", -#endif "cacheservice:empty-cache", }; @@ -1306,26 +1286,6 @@ ContentParent::Init() } #endif -#ifdef MOZ_ENABLE_PROFILER_SPS - nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1")); - bool profilerActive = false; - DebugOnly<nsresult> rv = profiler->IsActive(&profilerActive); - MOZ_ASSERT(NS_SUCCEEDED(rv)); - - if (profilerActive) { - nsCOMPtr<nsIProfilerStartParams> currentProfilerParams; - rv = profiler->GetStartParams(getter_AddRefs(currentProfilerParams)); - MOZ_ASSERT(NS_SUCCEEDED(rv)); - - nsCOMPtr<nsISupports> gatherer; - rv = profiler->GetProfileGatherer(getter_AddRefs(gatherer)); - MOZ_ASSERT(NS_SUCCEEDED(rv)); - mGatherer = static_cast<ProfileGatherer*>(gatherer.get()); - - StartProfiler(currentProfilerParams); - } -#endif - RefPtr<GeckoMediaPluginServiceParent> gmps(GeckoMediaPluginServiceParent::GetSingleton()); gmps->UpdateContentProcessGMPCapabilities(); } @@ -1752,12 +1712,6 @@ ContentParent::ActorDestroy(ActorDestroyReason why) mConsoleService = nullptr; -#ifdef MOZ_ENABLE_PROFILER_SPS - if (mGatherer && !mProfile.IsEmpty()) { - mGatherer->OOPExitProfile(mProfile); - } -#endif - if (obs) { RefPtr<nsHashPropertyBag> props = new nsHashPropertyBag(); @@ -2557,27 +2511,6 @@ ContentParent::Observe(nsISupports* aSubject, NS_ASSERTION(!mSubprocess, "Close should have nulled mSubprocess"); } -#ifdef MOZ_ENABLE_PROFILER_SPS - // Need to do this before the mIsAlive check to avoid missing profiles. - if (!strcmp(aTopic, "profiler-subprocess-gather")) { - if (mGatherer) { - mGatherer->WillGatherOOPProfile(); - if (mIsAlive && mSubprocess) { - Unused << SendGatherProfile(); - } - } - } - else if (!strcmp(aTopic, "profiler-subprocess")) { - nsCOMPtr<nsIProfileSaveEvent> pse = do_QueryInterface(aSubject); - if (pse) { - if (!mProfile.IsEmpty()) { - pse->AddSubProfile(mProfile.get()); - mProfile.Truncate(); - } - } - } -#endif - if (!mIsAlive || !mSubprocess) return NS_OK; @@ -2664,22 +2597,6 @@ ContentParent::Observe(nsISupports* aSubject, } } #endif -#ifdef MOZ_ENABLE_PROFILER_SPS - else if (!strcmp(aTopic, "profiler-started")) { - nsCOMPtr<nsIProfilerStartParams> params(do_QueryInterface(aSubject)); - StartProfiler(params); - } - else if (!strcmp(aTopic, "profiler-stopped")) { - mGatherer = nullptr; - Unused << SendStopProfiler(); - } - else if (!strcmp(aTopic, "profiler-paused")) { - Unused << SendPauseProfiler(true); - } - else if (!strcmp(aTopic, "profiler-resumed")) { - Unused << SendPauseProfiler(false); - } -#endif else if (!strcmp(aTopic, "cacheservice:empty-cache")) { Unused << SendNotifyEmptyHTTPCache(); } @@ -2953,29 +2870,6 @@ ContentParent::FriendlyName(nsAString& aName, bool aAnonymize) } } -PCrashReporterParent* -ContentParent::AllocPCrashReporterParent(const NativeThreadId& tid, - const uint32_t& processType) -{ - return nullptr; -} - -bool -ContentParent::RecvPCrashReporterConstructor(PCrashReporterParent* actor, - const NativeThreadId& tid, - const uint32_t& processType) -{ - static_cast<CrashReporterParent*>(actor)->SetChildData(tid, processType); - return true; -} - -bool -ContentParent::DeallocPCrashReporterParent(PCrashReporterParent* crashreporter) -{ - delete crashreporter; - return true; -} - hal_sandbox::PHalParent* ContentParent::AllocPHalParent() { @@ -3479,13 +3373,13 @@ ContentParent::RecvIsSecureURI(const uint32_t& type, } bool -ContentParent::RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive, const bool& aHSTSPriming) +ContentParent::RecvAccumulateMixedContentHSTS(const URIParams& aURI, const bool& aActive) { nsCOMPtr<nsIURI> ourURI = DeserializeURI(aURI); if (!ourURI) { return false; } - nsMixedContentBlocker::AccumulateMixedContentHSTS(ourURI, aActive, aHSTSPriming); + nsMixedContentBlocker::AccumulateMixedContentHSTS(ourURI, aActive); return true; } @@ -4581,19 +4475,6 @@ ContentParent::RecvCreateWindow(PBrowserParent* aThisTab, } bool -ContentParent::RecvProfile(const nsCString& aProfile) -{ -#ifdef MOZ_ENABLE_PROFILER_SPS - if (NS_WARN_IF(!mGatherer)) { - return true; - } - mProfile = aProfile; - mGatherer->GatheredOOPProfile(); -#endif - return true; -} - -bool ContentParent::RecvGetGraphicsDeviceInitData(ContentDeviceData* aOut) { gfxPlatform::GetPlatform()->BuildContentDeviceData(aOut); @@ -4679,34 +4560,6 @@ ContentParent::RecvNotifyBenchmarkResult(const nsString& aCodecName, return true; } -void -ContentParent::StartProfiler(nsIProfilerStartParams* aParams) -{ -#ifdef MOZ_ENABLE_PROFILER_SPS - if (NS_WARN_IF(!aParams)) { - return; - } - - ProfilerInitParams ipcParams; - - ipcParams.enabled() = true; - aParams->GetEntries(&ipcParams.entries()); - aParams->GetInterval(&ipcParams.interval()); - ipcParams.features() = aParams->GetFeatures(); - ipcParams.threadFilters() = aParams->GetThreadFilterNames(); - - Unused << SendStartProfiler(ipcParams); - - nsCOMPtr<nsIProfiler> profiler(do_GetService("@mozilla.org/tools/profiler;1")); - if (NS_WARN_IF(!profiler)) { - return; - } - nsCOMPtr<nsISupports> gatherer; - profiler->GetProfileGatherer(getter_AddRefs(gatherer)); - mGatherer = static_cast<ProfileGatherer*>(gatherer.get()); -#endif -} - bool ContentParent::RecvNotifyPushObservers(const nsCString& aScope, const IPC::Principal& aPrincipal, |