From aa1466040b3c1643ceca713ab5dd84e5bb89ac5c Mon Sep 17 00:00:00 2001 From: Benoit Girard Date: Wed, 5 Sep 2012 09:45:28 -0400 Subject: [PATCH] Bug 773428 - Part 2: Expose AddMarker via IDL. r=ehsan --HG-- extra : rebase_source : 208a4569f5a9e2895400ed244483d4e160b36f48 --- tools/profiler/nsIProfiler.idl | 3 ++- tools/profiler/nsProfiler.cpp | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/profiler/nsIProfiler.idl b/tools/profiler/nsIProfiler.idl index 0aa4521d706..acf2813fc54 100644 --- a/tools/profiler/nsIProfiler.idl +++ b/tools/profiler/nsIProfiler.idl @@ -5,13 +5,14 @@ #include "nsISupports.idl" -[scriptable, uuid(e388fded-1321-41af-a988-861a2bc5cfc3)] +[scriptable, uuid(c94651cf-082f-45e2-9481-33a1a700b46a)] interface nsIProfiler : nsISupports { void StartProfiler(in uint32_t aEntries, in uint32_t aInterval, [array, size_is(aFeatureCount)] in string aFeatures, in uint32_t aFeatureCount); void StopProfiler(); + void AddMarker(in string aMarker); string GetProfile(); [implicit_jscontext] jsval getProfileData(); diff --git a/tools/profiler/nsProfiler.cpp b/tools/profiler/nsProfiler.cpp index 8d906f39a89..19091c1388a 100644 --- a/tools/profiler/nsProfiler.cpp +++ b/tools/profiler/nsProfiler.cpp @@ -43,6 +43,13 @@ nsProfiler::StopProfiler() return NS_OK; } +NS_IMETHODIMP +nsProfiler::AddMarker(const char *aMarker) +{ + SAMPLE_MARKER(aMarker); + return NS_OK; +} + NS_IMETHODIMP nsProfiler::GetProfile(char **aProfile) {