summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSONObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/JSONObject.cpp')
-rw-r--r--JavaScriptCore/runtime/JSONObject.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/JavaScriptCore/runtime/JSONObject.cpp b/JavaScriptCore/runtime/JSONObject.cpp
index 0794189..b5477a1 100644
--- a/JavaScriptCore/runtime/JSONObject.cpp
+++ b/JavaScriptCore/runtime/JSONObject.cpp
@@ -133,7 +133,7 @@ static inline JSValue unwrapBoxedPrimitive(ExecState* exec, JSValue value)
return value;
JSObject* object = asObject(value);
if (object->inherits(&NumberObject::info))
- return jsNumber(exec, object->toNumber(exec));
+ return jsNumber(object->toNumber(exec));
if (object->inherits(&StringObject::info))
return jsString(exec, object->toString(exec));
if (object->inherits(&BooleanObject::info))
@@ -189,7 +189,7 @@ JSValue PropertyNameForFunctionCall::value(ExecState* exec) const
if (m_identifier)
m_value = jsString(exec, m_identifier->ustring());
else
- m_value = jsNumber(exec, m_number);
+ m_value = jsNumber(m_number);
}
return m_value;
}
@@ -329,7 +329,7 @@ void Stringifier::appendQuotedString(UStringBuilder& builder, const UString& val
static const char hexDigits[] = "0123456789abcdef";
UChar ch = data[i];
UChar hex[] = { '\\', 'u', hexDigits[(ch >> 12) & 0xF], hexDigits[(ch >> 8) & 0xF], hexDigits[(ch >> 4) & 0xF], hexDigits[ch & 0xF] };
- builder.append(hex, sizeof(hex) / sizeof(UChar));
+ builder.append(hex, WTF_ARRAY_LENGTH(hex));
break;
}
}
@@ -357,7 +357,7 @@ inline JSValue Stringifier::toJSON(JSValue value, const PropertyNameForFunctionC
return value;
JSValue list[] = { propertyName.value(m_exec) };
- ArgList args(list, sizeof(list) / sizeof(JSValue));
+ ArgList args(list, WTF_ARRAY_LENGTH(list));
return call(m_exec, object, callType, callData, value, args);
}
@@ -371,7 +371,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(UStringBuilder&
// Call the replacer function.
if (m_replacerCallType != CallTypeNone) {
JSValue list[] = { propertyName.value(m_exec), value };
- ArgList args(list, sizeof(list) / sizeof(JSValue));
+ ArgList args(list, WTF_ARRAY_LENGTH(list));
value = call(m_exec, m_replacer, m_replacerCallType, m_replacerCallData, holder, args);
if (m_exec->hadException())
return StringifyFailed;
@@ -868,7 +868,7 @@ EncodedJSValue JSC_HOST_CALL JSONProtoFuncStringify(ExecState* exec)
UString JSONStringify(ExecState* exec, JSValue value, unsigned indent)
{
- JSValue result = Stringifier(exec, jsNull(), jsNumber(exec, indent)).stringify(value);
+ JSValue result = Stringifier(exec, jsNull(), jsNumber(indent)).stringify(value);
if (result.isUndefinedOrNull())
return UString();
return result.getString(exec);