Bug 866239 - Fix build on platforms without profiler after bug 853358 r=bgirard
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user