Bug 853358 - Add plugin profiling support. r=ehsan,bsmedberg

This commit is contained in:
Benoit Girard
2013-03-21 10:17:23 +01:00
parent 14516ad542
commit fb221d781b
14 changed files with 260 additions and 84 deletions

View File

@@ -56,6 +56,8 @@
#include "PluginUtilsOSX.h"
#endif
#include "GeckoProfiler.h"
using namespace mozilla;
using namespace mozilla::plugins;
using mozilla::dom::CrashReporterChild;
@@ -2425,3 +2427,16 @@ PluginModuleChild::ProcessNativeEvents() {
CallProcessSomeEvents();
}
#endif
bool
PluginModuleChild::AnswerGeckoGetProfile(nsCString* aProfile) {
char* profile = profiler_get_profile();
if (profile != NULL) {
*aProfile = nsCString(profile, strlen(profile));
free(profile);
} else {
*aProfile = nsCString("", 0);
}
return true;
}