summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/profiler
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2009-11-20 15:27:15 +0000
committerSteve Block <steveblock@google.com>2009-11-23 15:18:54 +0000
commite7539b139ae6851cf6ed92a7741d38875e4c0909 (patch)
treeebac1a9ee758feaf8a85bdeb72f872735d5fcd82 /JavaScriptCore/profiler
parentfb5979ac6e2238d5ae16f43cca16e6a0932a4279 (diff)
downloadexternal_webkit-e7539b139ae6851cf6ed92a7741d38875e4c0909.zip
external_webkit-e7539b139ae6851cf6ed92a7741d38875e4c0909.tar.gz
external_webkit-e7539b139ae6851cf6ed92a7741d38875e4c0909.tar.bz2
Removes Android-specific wrapper for std::sort in Profile class.
It appears that previosuly, a wrapper function was required to perform the required type casting when passing a custom comparison function to Android's std::sort. This is no longer required, so the wrapper can be removed. Change-Id: I30add3d6b41eca2558867755a34dda21a180166f
Diffstat (limited to 'JavaScriptCore/profiler')
-rw-r--r--JavaScriptCore/profiler/Profile.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/JavaScriptCore/profiler/Profile.cpp b/JavaScriptCore/profiler/Profile.cpp
index 0a290ce..de75e71 100644
--- a/JavaScriptCore/profiler/Profile.cpp
+++ b/JavaScriptCore/profiler/Profile.cpp
@@ -29,13 +29,6 @@
#include "ProfileNode.h"
#include <stdio.h>
-#if PLATFORM(ANDROID)
-typedef bool (* Comparator)(const void*, const void*);
-namespace std {
-extern void sort(const void** start, const void** end, Comparator comp);
-}
-#endif
-
namespace JSC {
PassRefPtr<Profile> Profile::create(const UString& title, unsigned uid)
@@ -115,15 +108,6 @@ void Profile::debugPrintData() const
typedef pair<UString::Rep*, unsigned> NameCountPair;
-#if PLATFORM(ANDROID)
-typedef bool (* NameCountPairComparator)(const NameCountPair&, const NameCountPair&);
-
-inline void _sort(NameCountPair* start, NameCountPair* end, NameCountPairComparator comp)
-{
- std::sort((const void**) start, (const void**) end, (Comparator) comp);
-}
-#endif
-
static inline bool functionNameCountPairComparator(const NameCountPair& a, const NameCountPair& b)
{
return a.second > b.second;
@@ -141,11 +125,7 @@ void Profile::debugPrintDataSampleStyle() const
NameCountPairVector sortedFunctions(countedFunctions.size());
copyToVector(countedFunctions, sortedFunctions);
-#if PLATFORM(ANDROID)
- _sort(sortedFunctions.begin(), sortedFunctions.end(), functionNameCountPairComparator);
-#else
std::sort(sortedFunctions.begin(), sortedFunctions.end(), functionNameCountPairComparator);
-#endif
for (NameCountPairVector::iterator it = sortedFunctions.begin(); it != sortedFunctions.end(); ++it)
printf(" %-12d%s\n", (*it).second, UString((*it).first).UTF8String().c_str());