summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSString.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-24 08:29:43 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-24 08:29:43 +0200
commit2e2ba8ff45915f40ed3e014101269c175f2a89a0 (patch)
tree3b94a9a9fa83efa384b8dac611cf8c6495532a62 /Source/JavaScriptCore/runtime/JSString.h
parentf53e6f8e798362ed712d4a51633b0d0b03dbc213 (diff)
downloadqtwebkit-2e2ba8ff45915f40ed3e014101269c175f2a89a0.tar.gz
Imported WebKit commit bf0b0213bbf3886c96610020602012ca7d11b084 (http://svn.webkit.org/repository/webkit/trunk@126545)
New snapshot with clang and python build fixes
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSString.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSString.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/JavaScriptCore/runtime/JSString.h b/Source/JavaScriptCore/runtime/JSString.h
index d6fc4c2a1..e91553aeb 100644
--- a/Source/JavaScriptCore/runtime/JSString.h
+++ b/Source/JavaScriptCore/runtime/JSString.h
@@ -500,23 +500,23 @@ namespace JSC {
inline bool isJSString(JSValue v) { return v.isCell() && v.asCell()->classInfo() == &JSString::s_info; }
- inline bool JSCell::toBoolean() const
+ inline bool JSCell::toBoolean(ExecState* exec) const
{
if (isString())
return static_cast<const JSString*>(this)->toBoolean();
- return !structure()->typeInfo().masqueradesAsUndefined();
+ return !structure()->masqueradesAsUndefined(exec->lexicalGlobalObject());
}
// --- JSValue inlines ----------------------------
- inline bool JSValue::toBoolean() const
+ inline bool JSValue::toBoolean(ExecState* exec) const
{
if (isInt32())
return asInt32();
if (isDouble())
return asDouble() > 0.0 || asDouble() < 0.0; // false for NaN
if (isCell())
- return asCell()->toBoolean();
+ return asCell()->toBoolean(exec);
return isTrue(); // false, null, and undefined all convert to false.
}