Commit 219ed0ac authored by mjs's avatar mjs

- fixed 3095446 - Crash on AppleScript page due to very long argument list

        * kjs/grammar.y: Don't try to construct the argument list in the
	right order, since that blows out the parser stack.
	* kjs/nodes.cpp:
        (ArgumentsNode::ArgumentsNode): Instead reverse the argument list
	here.
        * kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
        * kjs/grammar.cpp: Updated from grammar.y.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2847 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1a9f113f
2002-11-24 Maciej Stachowiak <mjs@apple.com>
- fixed 3095446 - Crash on AppleScript page due to very long argument list
* kjs/grammar.y: Don't try to construct the argument list in the
right order, since that blows out the parser stack.
* kjs/nodes.cpp:
(ArgumentsNode::ArgumentsNode): Instead reverse the argument list
here.
* kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
* kjs/grammar.cpp: Updated from grammar.y.
2002-11-23 Maciej Stachowiak <mjs@apple.com>
- completed Darin's mostly-fix for 3037795 - Resource use
......
2002-11-24 Maciej Stachowiak <mjs@apple.com>
- fixed 3095446 - Crash on AppleScript page due to very long argument list
* kjs/grammar.y: Don't try to construct the argument list in the
right order, since that blows out the parser stack.
* kjs/nodes.cpp:
(ArgumentsNode::ArgumentsNode): Instead reverse the argument list
here.
* kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
* kjs/grammar.cpp: Updated from grammar.y.
2002-11-23 Maciej Stachowiak <mjs@apple.com>
- completed Darin's mostly-fix for 3037795 - Resource use
......
2002-11-24 Maciej Stachowiak <mjs@apple.com>
- fixed 3095446 - Crash on AppleScript page due to very long argument list
* kjs/grammar.y: Don't try to construct the argument list in the
right order, since that blows out the parser stack.
* kjs/nodes.cpp:
(ArgumentsNode::ArgumentsNode): Instead reverse the argument list
here.
* kjs/nodes.h: Make ArgumentsNode a friend of ArgumentListNode.
* kjs/grammar.cpp: Updated from grammar.y.
2002-11-23 Maciej Stachowiak <mjs@apple.com>
- completed Darin's mostly-fix for 3037795 - Resource use
......
This diff is collapsed.
......@@ -245,11 +245,7 @@ Arguments:
ArgumentList:
AssignmentExpr { $$ = new ArgumentListNode($1); }
/* #ifdef APPLE_CHANGES (not using an actual ifdef because this is yacc) */
| AssignmentExpr ',' ArgumentList { $$ = new ArgumentListNode($3, $1); }
/* #else */
/* | ArgumentList ',' AssignmentExpr { $$ = new ArgumentListNode($1, $3); } */
/* #endif */
| ArgumentList ',' AssignmentExpr { $$ = new ArgumentListNode($1, $3); }
;
LeftHandSideExpr:
......
......@@ -615,6 +615,19 @@ List ArgumentListNode::evaluateList(ExecState *exec)
ArgumentsNode::ArgumentsNode(ArgumentListNode *l) : list(l)
{
if (list == NULL) {
return;
}
ArgumentListNode *prev = list;
ArgumentListNode *cur = prev->list;
while (cur != NULL) {
prev->list = cur->list;
cur->list = list;
list = cur;
cur = prev->list;
}
}
void ArgumentsNode::ref()
......
......@@ -314,6 +314,7 @@ namespace KJS {
List evaluateList(ExecState *exec);
virtual void streamTo(SourceStream &s) const;
private:
friend class ArgumentsNode;
ArgumentListNode *list;
Node *expr;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment