Bug 866239 - Fix build on platforms without profiler after bug 853358 r=bgirard

This commit is contained in:
Landry Breuil
2013-04-27 16:20:23 +02:00
parent cdd6bfc1c4
commit 3c3a62dd88
2 changed files with 10 additions and 1 deletions

View File

@@ -38,7 +38,9 @@
#include "PluginHangUIParent.h"
#include "mozilla/widget/AudioSession.h"
#endif
#ifdef MOZ_ENABLE_PROFILER_SPS
#include "nsIProfileSaveEvent.h"
#endif
#include "mozilla/Services.h"
#include "nsIObserverService.h"
@@ -141,14 +143,18 @@ PluginModuleParent::PluginModuleParent(const char* aFilePath)
Preferences::RegisterCallback(TimeoutChanged, kHangUIMinDisplayPref, this);
#endif
#ifdef MOZ_ENABLE_PROFILER_SPS
InitPluginProfiling();
#endif
}
PluginModuleParent::~PluginModuleParent()
{
NS_ASSERTION(OkToCleanup(), "unsafe destruction");
#ifdef MOZ_ENABLE_PROFILER_SPS
ShutdownPluginProfiling();
#endif
if (!mShutdown) {
NS_WARNING("Plugin host deleted the module without shutting down.");
@@ -1717,6 +1723,7 @@ PluginModuleParent::OnCrash(DWORD processID)
#endif // MOZ_CRASHREPORTER_INJECTOR
#ifdef MOZ_ENABLE_PROFILER_SPS
class PluginProfilerObserver MOZ_FINAL : public nsIObserver,
public nsSupportsWeakReference
{
@@ -1768,4 +1775,4 @@ PluginModuleParent::ShutdownPluginProfiling()
observerService->RemoveObserver(mProfilerObserver, "profiler-subprocess");
}
}
#endif