diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-05-07 11:21:11 +0200 |
commit | 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (patch) | |
tree | 988e8c5b116dd0466244ae2fe5af8ee9be926d76 /Source/JavaScriptCore/runtime/JSValue.cpp | |
parent | dd91e772430dc294e3bf478c119ef8d43c0a3358 (diff) | |
download | qtwebkit-2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47.tar.gz |
Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286)
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSValue.cpp')
-rw-r--r-- | Source/JavaScriptCore/runtime/JSValue.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Source/JavaScriptCore/runtime/JSValue.cpp b/Source/JavaScriptCore/runtime/JSValue.cpp index 36697c60c..088f214b9 100644 --- a/Source/JavaScriptCore/runtime/JSValue.cpp +++ b/Source/JavaScriptCore/runtime/JSValue.cpp @@ -260,19 +260,20 @@ bool JSValue::isValidCallee() JSString* JSValue::toStringSlowCase(ExecState* exec) const { + JSGlobalData& globalData = exec->globalData(); ASSERT(!isString()); if (isInt32()) - return jsString(&exec->globalData(), exec->globalData().numericStrings.add(asInt32())); + return jsString(&globalData, globalData.numericStrings.add(asInt32())); if (isDouble()) - return jsString(&exec->globalData(), exec->globalData().numericStrings.add(asDouble())); + return jsString(&globalData, globalData.numericStrings.add(asDouble())); if (isTrue()) - return jsNontrivialString(exec, exec->propertyNames().trueKeyword.ustring()); + return globalData.smallStrings.trueString(&globalData); if (isFalse()) - return jsNontrivialString(exec, exec->propertyNames().falseKeyword.ustring()); + return globalData.smallStrings.falseString(&globalData); if (isNull()) - return jsNontrivialString(exec, exec->propertyNames().nullKeyword.ustring()); + return globalData.smallStrings.nullString(&globalData); if (isUndefined()) - return jsNontrivialString(exec, exec->propertyNames().undefined.ustring()); + return globalData.smallStrings.undefinedString(&globalData); ASSERT(isCell()); JSValue value = asCell()->toPrimitive(exec, PreferString); @@ -282,4 +283,9 @@ JSString* JSValue::toStringSlowCase(ExecState* exec) const return value.toString(exec); } +UString JSValue::toUStringSlowCase(ExecState* exec) const +{ + return inlineJSValueNotStringtoUString(*this, exec); +} + } // namespace JSC |