diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp index 6714cf5..b5c9571 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/InternalFunction.cpp @@ -48,4 +48,24 @@ const UString& InternalFunction::name(JSGlobalData* globalData) return asString(getDirect(globalData->propertyNames->name))->value(); } +const UString InternalFunction::displayName(JSGlobalData* globalData) +{ + JSValue displayName = getDirect(globalData->propertyNames->displayName); + + if (displayName && isJSString(globalData, displayName)) + return asString(displayName)->value(); + + return UString::null(); +} + +const UString InternalFunction::calculatedDisplayName(JSGlobalData* globalData) +{ + const UString explicitName = displayName(globalData); + + if (!explicitName.isEmpty()) + return explicitName; + + return name(globalData); +} + } // namespace JSC |