Changeset 10496 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp


Ignore:
Timestamp:
Sep 8, 2005, 6:19:19 PM (20 years ago)
Author:
darin
Message:
  • fixed overloaded versions of throwError so that they substitute *all* expected parameters into the message string -- some versions used to skip parameters, resulting in "%s" being printed in the error message.

Reviewed by Geoff.

  • kjs/nodes.h: Updated declarations to use "const &" and not to name parameters
  • kjs/nodes.cpp: (Node::throwError): Updated to match above and add one missing call to substitute.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes.cpp

    r10456 r10496  
    147147
    148148
    149 ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, Identifier label)
     149ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, const Identifier &label)
    150150{
    151151    UString message = msg;
     
    163163}
    164164
    165 ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr, Identifier label)
     165ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr, const Identifier &label)
    166166{
    167167    UString message = msg;
    168168    substitute(message, v->toString(exec));
    169169    substitute(message, expr->toString());
     170    substitute(message, label.ustring());
    170171    return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
    171172}
    172173
    173 ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Identifier label)
     174ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, const Identifier &label)
    174175{
    175176    UString message = msg;
     
    178179    return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
    179180}
    180 
    181181
    182182void Node::setExceptionDetailsIfNeeded(ExecState *exec)
Note: See TracChangeset for help on using the changeset viewer.