Bug 301545: avoid crash when attribute-op name collides with local var or arg

by taking an early out from LookupArgOrVar for JSOP_QNAMEPART. r+a=brendan.
This commit is contained in:
shaver%mozilla.org 2005-07-21 19:18:15 +00:00
Родитель 77c3043556
Коммит 9e4927f615
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -1742,6 +1742,10 @@ LookupArgOrVar(JSContext *cx, JSTreeContext *tc, JSParseNode *pn)
if (pn->pn_slot >= 0 || pn->pn_op == JSOP_ARGUMENTS)
return JS_TRUE;
/* QNAME references can never be optimized to use arg/var storage. */
if (pn->pn_op == JSOP_QNAMEPART)
return JS_TRUE;
/*
* A Script object can be used to split an eval into a compile step done
* at construction time, and an execute step done separately, possibly in