Commit cf48a173 authored by timothy@apple.com's avatar timothy@apple.com

Expose the ProfileNode functionName sorting functions on

JavaScriptProfileNode.

Reviewed by Kevin McCullough.

* page/JavaScriptProfileNode.cpp:
(WebCore::sortFunctionNameDescending): Call ProfileNode.
(WebCore::sortFunctionNameAscending): Ditto.
(WebCore::ProfileNodeClass): Add static functions.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33936 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 21176464
2008-05-20 Timothy Hatcher <timothy@apple.com>
Expose the ProfileNode functionName sorting functions on
JavaScriptProfileNode.
Reviewed by Kevin McCullough.
* page/JavaScriptProfileNode.cpp:
(WebCore::sortFunctionNameDescending): Call ProfileNode.
(WebCore::sortFunctionNameAscending): Ditto.
(WebCore::ProfileNodeClass): Add static functions.
2008-05-20 Darin Adler <darin@apple.com>
Reviewed by Mitz.
......@@ -85,7 +97,7 @@
(WebCore::sortSelfTimeAscending): Ditto.
(WebCore::sortCallsDescending): Ditto.
(WebCore::sortCallsAscending): Ditto.
(WebCore::ProfileNodeClass): Add static static functions.
(WebCore::ProfileNodeClass): Add static functions.
2008-05-19 Timothy Hatcher <timothy@apple.com>
......@@ -229,6 +229,28 @@ static JSValueRef sortCallsAscending(JSContextRef ctx, JSObjectRef /*function*/,
return JSValueMakeUndefined(ctx);
}
static JSValueRef sortFunctionNameDescending(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments*/, JSValueRef* /*exception*/)
{
if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass()))
return JSValueMakeUndefined(ctx);
ProfileNode* profileNode = static_cast<ProfileNode*>(JSObjectGetPrivate(thisObject));
profileNode->sortFunctionNameDescending();
return JSValueMakeUndefined(ctx);
}
static JSValueRef sortFunctionNameAscending(JSContextRef ctx, JSObjectRef /*function*/, JSObjectRef thisObject, size_t /*argumentCount*/, const JSValueRef[] /*arguments*/, JSValueRef* /*exception*/)
{
if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass()))
return JSValueMakeUndefined(ctx);
ProfileNode* profileNode = static_cast<ProfileNode*>(JSObjectGetPrivate(thisObject));
profileNode->sortFunctionNameAscending();
return JSValueMakeUndefined(ctx);
}
static void finalize(JSObjectRef object)
{
ProfileNode* profileNode = static_cast<ProfileNode*>(JSObjectGetPrivate(object));
......@@ -256,6 +278,8 @@ JSClassRef ProfileNodeClass()
{ "sortSelfTimeAscending", sortSelfTimeAscending, kJSPropertyAttributeNone },
{ "sortCallsDescending", sortCallsDescending, kJSPropertyAttributeNone },
{ "sortCallsAscending", sortCallsAscending, kJSPropertyAttributeNone },
{ "sortFunctionNameDescending", sortFunctionNameDescending, kJSPropertyAttributeNone },
{ "sortFunctionNameAscending", sortFunctionNameAscending, kJSPropertyAttributeNone },
{ 0, 0, 0 }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment