Modified: trunk/Source/_javascript_Core/ChangeLog (100319 => 100320)
--- trunk/Source/_javascript_Core/ChangeLog 2011-11-15 22:17:16 UTC (rev 100319)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-11-15 22:19:59 UTC (rev 100320)
@@ -1,3 +1,19 @@
+2011-11-15 Geoffrey Garen <[email protected]>
+
+ Use MarkedArgumentBuffer to avoid making assumptions about argument order
+ https://bugs.webkit.org/show_bug.cgi?id=72418
+
+ Reviewed by Sam Weinig.
+
+ A step toward reversing the argument order.
+
+ * runtime/JSONObject.cpp:
+ (JSC::Stringifier::toJSON):
+ (JSC::Stringifier::appendStringifiedValue):
+ (JSC::Walker::callReviver): Don't assume that ArgList wants to point
+ at arguments in forward order. Instead, use MarkedArgumentBuffer, which
+ will make the decision for us.
+
2011-11-15 Filip Pizlo <[email protected]>
DFG should distinguish between constants in the constant pool and weak
Modified: trunk/Source/_javascript_Core/runtime/JSONObject.cpp (100319 => 100320)
--- trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2011-11-15 22:17:16 UTC (rev 100319)
+++ trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2011-11-15 22:19:59 UTC (rev 100320)
@@ -340,8 +340,8 @@
if (callType == CallTypeNone)
return value;
- JSValue list[] = { propertyName.value(m_exec) };
- ArgList args(list, WTF_ARRAY_LENGTH(list));
+ MarkedArgumentBuffer args;
+ args.append(propertyName.value(m_exec));
return call(m_exec, object, callType, callData, value, args);
}
@@ -354,8 +354,9 @@
// Call the replacer function.
if (m_replacerCallType != CallTypeNone) {
- JSValue list[] = { propertyName.value(m_exec), value };
- ArgList args(list, WTF_ARRAY_LENGTH(list));
+ MarkedArgumentBuffer args;
+ args.append(propertyName.value(m_exec));
+ args.append(value);
value = call(m_exec, m_replacer.get(), m_replacerCallType, m_replacerCallData, holder, args);
if (m_exec->hadException())
return StringifyFailed;
@@ -621,9 +622,10 @@
private:
JSValue callReviver(JSObject* thisObj, JSValue property, JSValue unfiltered)
{
- JSValue args[] = { property, unfiltered };
- ArgList argList(args, 2);
- return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, argList);
+ MarkedArgumentBuffer args;
+ args.append(property);
+ args.append(unfiltered);
+ return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, args);
}
friend class Holder;