diff options
Diffstat (limited to 'WebCore/inspector/JavaScriptProfileNode.cpp')
-rw-r--r-- | WebCore/inspector/JavaScriptProfileNode.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/WebCore/inspector/JavaScriptProfileNode.cpp b/WebCore/inspector/JavaScriptProfileNode.cpp index ef2b2cd..8d00783 100644 --- a/WebCore/inspector/JavaScriptProfileNode.cpp +++ b/WebCore/inspector/JavaScriptProfileNode.cpp @@ -35,6 +35,7 @@ #include <JavaScriptCore/JSStringRef.h> #include <runtime/JSLock.h> #include <runtime/JSValue.h> +#include <wtf/StdLibExtras.h> using namespace JSC; @@ -46,11 +47,11 @@ typedef HashMap<ProfileNode*, JSObject*> ProfileNodeMap; static ProfileNodeMap& profileNodeCache() { - static ProfileNodeMap staticProfileNodes; + DEFINE_STATIC_LOCAL(ProfileNodeMap, staticProfileNodes, ()); return staticProfileNodes; } -static JSValueRef getFunctionName(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getFunctionName(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -60,7 +61,7 @@ static JSValueRef getFunctionName(JSContextRef ctx, JSObjectRef thisObject, JSSt return JSValueMakeString(ctx, functionNameString.get()); } -static JSValueRef getURL(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getURL(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -70,7 +71,7 @@ static JSValueRef getURL(JSContextRef ctx, JSObjectRef thisObject, JSStringRef p return JSValueMakeString(ctx, urlString.get()); } -static JSValueRef getLineNumber(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getLineNumber(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { if (!JSValueIsObjectOfClass(ctx, thisObject, ProfileNodeClass())) return JSValueMakeUndefined(ctx); @@ -79,7 +80,7 @@ static JSValueRef getLineNumber(JSContextRef ctx, JSObjectRef thisObject, JSStri return JSValueMakeNumber(ctx, profileNode->lineNumber()); } -static JSValueRef getTotalTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getTotalTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -90,7 +91,7 @@ static JSValueRef getTotalTime(JSContextRef ctx, JSObjectRef thisObject, JSStrin return JSValueMakeNumber(ctx, profileNode->totalTime()); } -static JSValueRef getSelfTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getSelfTime(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -101,7 +102,7 @@ static JSValueRef getSelfTime(JSContextRef ctx, JSObjectRef thisObject, JSString return JSValueMakeNumber(ctx, profileNode->selfTime()); } -static JSValueRef getTotalPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getTotalPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -112,7 +113,7 @@ static JSValueRef getTotalPercent(JSContextRef ctx, JSObjectRef thisObject, JSSt return JSValueMakeNumber(ctx, profileNode->totalPercent()); } -static JSValueRef getSelfPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getSelfPercent(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -123,7 +124,7 @@ static JSValueRef getSelfPercent(JSContextRef ctx, JSObjectRef thisObject, JSStr return JSValueMakeNumber(ctx, profileNode->selfPercent()); } -static JSValueRef getNumberOfCalls(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getNumberOfCalls(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -134,7 +135,7 @@ static JSValueRef getNumberOfCalls(JSContextRef ctx, JSObjectRef thisObject, JSS return JSValueMakeNumber(ctx, profileNode->numberOfCalls()); } -static JSValueRef getChildren(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getChildren(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef* exception) { JSC::JSLock lock(false); @@ -180,7 +181,7 @@ static JSValueRef getChildren(JSContextRef ctx, JSObjectRef thisObject, JSString return result; } -static JSValueRef getVisible(JSContextRef ctx, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception) +static JSValueRef getVisible(JSContextRef ctx, JSObjectRef thisObject, JSStringRef, JSValueRef*) { JSC::JSLock lock(false); @@ -223,7 +224,7 @@ JSClassRef ProfileNodeClass() return profileNodeClass; } -JSValue* toJS(ExecState* exec, ProfileNode* profileNode) +JSValuePtr toJS(ExecState* exec, ProfileNode* profileNode) { if (!profileNode) return jsNull(); |