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:
@@ -53,9 +53,7 @@
|
||||
#include "mozilla/ipc/CrashReporterClient.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
#include "ChildProfilerController.h"
|
||||
#endif
|
||||
#include "GeckoProfiler.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::ipc;
|
||||
@@ -286,11 +284,6 @@ PluginModuleChild::InitForChrome(const std::string& aPluginFilename,
|
||||
|
||||
GetIPCChannel()->SetAbortOnError(true);
|
||||
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
mProfilerController = new ChildProfilerController();
|
||||
Unused << SendInitProfiler(mProfilerController->SetUpEndpoints(OtherPid()));
|
||||
#endif
|
||||
|
||||
// TODO: use PluginPRLibrary here
|
||||
|
||||
#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
|
||||
@@ -753,13 +746,6 @@ PluginModuleChild::AnswerInitCrashReporter(Shmem&& aShmem, mozilla::dom::NativeT
|
||||
void
|
||||
PluginModuleChild::ActorDestroy(ActorDestroyReason why)
|
||||
{
|
||||
#ifdef MOZ_GECKO_PROFILER
|
||||
if (mProfilerController) {
|
||||
mProfilerController->Shutdown();
|
||||
mProfilerController = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mIsChrome) {
|
||||
PluginModuleChild* chromeInstance = PluginModuleChild::GetChrome();
|
||||
if (chromeInstance) {
|
||||
@@ -2679,6 +2665,54 @@ PluginModuleChild::ProcessNativeEvents() {
|
||||
}
|
||||
#endif
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
PluginModuleChild::RecvStartProfiler(const ProfilerInitParams& params)
|
||||
{
|
||||
nsTArray<const char*> filterArray;
|
||||
for (size_t i = 0; i < params.filters().Length(); ++i) {
|
||||
filterArray.AppendElement(params.filters()[i].get());
|
||||
}
|
||||
|
||||
profiler_start(params.entries(), params.interval(), params.features(),
|
||||
filterArray.Elements(), filterArray.Length());
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
PluginModuleChild::RecvStopProfiler()
|
||||
{
|
||||
profiler_stop();
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
PluginModuleChild::RecvPauseProfiler(const bool& aPause)
|
||||
{
|
||||
if (aPause) {
|
||||
profiler_pause();
|
||||
} else {
|
||||
profiler_resume();
|
||||
}
|
||||
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult
|
||||
PluginModuleChild::RecvGatherProfile()
|
||||
{
|
||||
nsCString profileCString;
|
||||
UniquePtr<char[]> profile = profiler_get_profile();
|
||||
if (profile != nullptr) {
|
||||
profileCString = nsCString(profile.get(), strlen(profile.get()));
|
||||
} else {
|
||||
profileCString = nsCString("", 0);
|
||||
}
|
||||
|
||||
Unused << SendProfile(profileCString, false);
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
NPError
|
||||
PluginModuleChild::PluginRequiresAudioDeviceChanges(
|
||||
PluginInstanceChild* aInstance,
|
||||
|
||||
Reference in New Issue
Block a user