⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 100320 in webkit


Ignore:
Timestamp:
Nov 15, 2011, 2:19:59 PM (15 years ago)
Author:
ggaren@apple.com
Message:

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.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r100315 r100320  
     12011-11-15  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Use MarkedArgumentBuffer to avoid making assumptions about argument order
     4        https://bugs.webkit.org/show_bug.cgi?id=72418
     5
     6        Reviewed by Sam Weinig.
     7       
     8        A step toward reversing the argument order.
     9
     10        * runtime/JSONObject.cpp:
     11        (JSC::Stringifier::toJSON):
     12        (JSC::Stringifier::appendStringifiedValue):
     13        (JSC::Walker::callReviver): Don't assume that ArgList wants to point
     14        at arguments in forward order. Instead, use MarkedArgumentBuffer, which
     15        will make the decision for us.
     16
    1172011-11-15  Filip Pizlo  <fpizlo@apple.com>
    218
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r100006 r100320  
    341341        return value;
    342342
    343     JSValue list[] = { propertyName.value(m_exec) };
    344     ArgList args(list, WTF_ARRAY_LENGTH(list));
     343    MarkedArgumentBuffer args;
     344    args.append(propertyName.value(m_exec));
    345345    return call(m_exec, object, callType, callData, value, args);
    346346}
     
    355355    // Call the replacer function.
    356356    if (m_replacerCallType != CallTypeNone) {
    357         JSValue list[] = { propertyName.value(m_exec), value };
    358         ArgList args(list, WTF_ARRAY_LENGTH(list));
     357        MarkedArgumentBuffer args;
     358        args.append(propertyName.value(m_exec));
     359        args.append(value);
    359360        value = call(m_exec, m_replacer.get(), m_replacerCallType, m_replacerCallData, holder, args);
    360361        if (m_exec->hadException())
     
    622623    JSValue callReviver(JSObject* thisObj, JSValue property, JSValue unfiltered)
    623624    {
    624         JSValue args[] = { property, unfiltered };
    625         ArgList argList(args, 2);
    626         return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, argList);
     625        MarkedArgumentBuffer args;
     626        args.append(property);
     627        args.append(unfiltered);
     628        return call(m_exec, m_function.get(), m_callType, m_callData, thisObj, args);
    627629    }
    628630
Note: See TracChangeset for help on using the changeset viewer.