[webkit-changes] cvs commit: JavaScriptCore/kjs nodes.cpp nodes.h
Darin
darin at opensource.apple.com
Thu Sep 8 18:19:20 PDT 2005
darin 05/09/08 18:19:20
Modified: . ChangeLog
kjs nodes.cpp nodes.h
Log:
- 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.
Revision Changes Path
1.820 +12 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.819
retrieving revision 1.820
diff -u -r1.819 -r1.820
--- ChangeLog 9 Sep 2005 00:51:05 -0000 1.819
+++ ChangeLog 9 Sep 2005 01:19:17 -0000 1.820
@@ -1,5 +1,17 @@
2005-09-08 Darin Adler <darin at apple.com>
+ - 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.
+
+2005-09-08 Darin Adler <darin at apple.com>
+
Reviewed by Geoff.
- updated to PCRE 6.1
1.81 +4 -4 JavaScriptCore/kjs/nodes.cpp
Index: nodes.cpp
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/nodes.cpp,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- nodes.cpp 4 Sep 2005 01:18:12 -0000 1.80
+++ nodes.cpp 9 Sep 2005 01:19:19 -0000 1.81
@@ -146,7 +146,7 @@
}
-ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, Identifier label)
+ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, const Identifier &label)
{
UString message = msg;
substitute(message, label.ustring());
@@ -162,15 +162,16 @@
return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
}
-ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr, Identifier label)
+ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr, const Identifier &label)
{
UString message = msg;
substitute(message, v->toString(exec));
substitute(message, expr->toString());
+ substitute(message, label.ustring());
return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
}
-ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Identifier label)
+ValueImp *Node::throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, const Identifier &label)
{
UString message = msg;
substitute(message, v->toString(exec));
@@ -178,7 +179,6 @@
return KJS::throwError(exec, e, message, lineNo(), sourceId(), &sourceURL);
}
-
void Node::setExceptionDetailsIfNeeded(ExecState *exec)
{
ValueImp *exceptionValue = exec->exception();
1.32 +5 -5 JavaScriptCore/kjs/nodes.h
Index: nodes.h
===================================================================
RCS file: /cvs/root/JavaScriptCore/kjs/nodes.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- nodes.h 31 Aug 2005 18:36:47 -0000 1.31
+++ nodes.h 9 Sep 2005 01:19:19 -0000 1.32
@@ -98,11 +98,11 @@
protected:
ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg);
- ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr);
- ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, Identifier label);
- ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Identifier ident);
- ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *e1, Node *e2);
- ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *v, Node *expr, Identifier ident);
+ ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *);
+ ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, const Identifier &);
+ ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, const Identifier &);
+ ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *, Node *);
+ ValueImp *throwError(ExecState *exec, ErrorType e, const char *msg, ValueImp *, Node *, const Identifier &);
void setExceptionDetailsIfNeeded(ExecState *exec);
int line;
More information about the webkit-changes
mailing list