Backed out 5 changesets (bug 1330185, bug 1330184) for leaking an nsTArray_base from the plugin process on Win8

Backed out changeset e6f368f2d874 (bug 1330185)
Backed out changeset 2b8d50fcb20f (bug 1330184)
Backed out changeset dbe452a9eebb (bug 1330184)
Backed out changeset e13b9e798e16 (bug 1330184)
Backed out changeset 52489c7eadaf (bug 1330184)

MozReview-Commit-ID: 8L20BZ5E3t2
This commit is contained in:
Phil Ringnalda
2017-05-22 19:45:35 -07:00
parent 934ead3ba7
commit f13976f44f
37 changed files with 734 additions and 878 deletions

View File

@@ -33,8 +33,10 @@
#include "prclist.h"
#include "PluginQuirks.h"
#include "gfxPlatform.h"
#ifdef MOZ_GECKO_PROFILER
#include "CrossProcessProfilerController.h"
#endif
#include "GeckoProfiler.h"
#include "ProfilerParent.h"
#include "nsPluginTags.h"
#include "nsUnicharUtils.h"
#include "mozilla/layers/TextureClientRecycleAllocator.h"
@@ -56,6 +58,9 @@
using base::KillProcess;
using mozilla::PluginLibrary;
#ifdef MOZ_GECKO_PROFILER
using mozilla::CrossProcessProfilerController;
#endif
using mozilla::ipc::MessageChannel;
using mozilla::ipc::GeckoChildProcessHost;
@@ -631,6 +636,10 @@ PluginModuleChromeParent::OnProcessLaunched(const bool aSucceeded)
}
#endif
}
#ifdef MOZ_GECKO_PROFILER
mProfilerController = MakeUnique<CrossProcessProfilerController>(this);
#endif
}
bool
@@ -770,6 +779,10 @@ PluginModuleChromeParent::~PluginModuleChromeParent()
MOZ_CRASH("unsafe destruction");
}
#ifdef MOZ_GECKO_PROFILER
mProfilerController = nullptr;
#endif
#ifdef XP_WIN
// If we registered for audio notifications, stop.
mozilla::plugins::PluginUtilsWin::RegisterForAudioDeviceChanges(this,
@@ -3120,15 +3133,6 @@ PluginModuleParent::RecvReturnSitesWithData(nsTArray<nsCString>&& aSites,
return IPC_OK();
}
mozilla::ipc::IPCResult
PluginModuleParent::RecvInitProfiler(Endpoint<PProfilerParent>&& aEndpoint)
{
if (!ProfilerParent::Alloc(Move(aEndpoint))) {
NS_WARNING("ProfilerParent::Alloc failed");
}
return IPC_OK();
}
layers::TextureClientRecycleAllocator*
PluginModuleParent::EnsureTextureAllocatorForDirectBitmap()
{
@@ -3259,6 +3263,18 @@ PluginModuleChromeParent::OnCrash(DWORD processID)
#endif // MOZ_CRASHREPORTER_INJECTOR
mozilla::ipc::IPCResult
PluginModuleChromeParent::RecvProfile(const nsCString& aProfile,
const bool& aIsExitProfile)
{
#ifdef MOZ_GECKO_PROFILER
if (mProfilerController) {
mProfilerController->RecvProfile(aProfile, aIsExitProfile);
}
#endif
return IPC_OK();
}
mozilla::ipc::IPCResult
PluginModuleParent::AnswerGetKeyState(const int32_t& aVirtKey, int16_t* aRet)
{