зеркало из https://github.com/mozilla/pjs.git
Fix arg vs. nested function hard case 299639, r=shaver).
This commit is contained in:
Родитель
7096b3fc4e
Коммит
cab26858e9
|
@ -2892,6 +2892,7 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
|
||||||
if (cg->treeContext.flags & TCF_IN_FUNCTION) {
|
if (cg->treeContext.flags & TCF_IN_FUNCTION) {
|
||||||
JSObject *obj, *pobj;
|
JSObject *obj, *pobj;
|
||||||
JSProperty *prop;
|
JSProperty *prop;
|
||||||
|
JSScopeProperty *sprop;
|
||||||
uintN slot;
|
uintN slot;
|
||||||
|
|
||||||
obj = OBJ_GET_PARENT(cx, fun->object);
|
obj = OBJ_GET_PARENT(cx, fun->object);
|
||||||
|
@ -2899,8 +2900,11 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
|
||||||
&pobj, &prop)) {
|
&pobj, &prop)) {
|
||||||
return JS_FALSE;
|
return JS_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
JS_ASSERT(prop && pobj == obj);
|
JS_ASSERT(prop && pobj == obj);
|
||||||
slot = ((JSScopeProperty *) prop)->shortid;
|
sprop = (JSScopeProperty *) prop;
|
||||||
|
JS_ASSERT(sprop->getter == js_GetLocalVariable);
|
||||||
|
slot = sprop->shortid;
|
||||||
OBJ_DROP_PROPERTY(cx, pobj, prop);
|
OBJ_DROP_PROPERTY(cx, pobj, prop);
|
||||||
|
|
||||||
if (atomIndex >= JS_BIT(16)) {
|
if (atomIndex >= JS_BIT(16)) {
|
||||||
|
|
|
@ -830,7 +830,9 @@ FunctionDef(JSContext *cx, JSTokenStream *ts, JSTreeContext *tc,
|
||||||
}
|
}
|
||||||
if (prop)
|
if (prop)
|
||||||
OBJ_DROP_PROPERTY(cx, pobj, prop);
|
OBJ_DROP_PROPERTY(cx, pobj, prop);
|
||||||
if (!prop || pobj != varobj) {
|
if (!prop ||
|
||||||
|
pobj != varobj ||
|
||||||
|
((JSScopeProperty *)prop)->getter != js_GetLocalVariable) {
|
||||||
if (!js_AddHiddenProperty(cx, varobj, ATOM_TO_JSID(funAtom),
|
if (!js_AddHiddenProperty(cx, varobj, ATOM_TO_JSID(funAtom),
|
||||||
js_GetLocalVariable,
|
js_GetLocalVariable,
|
||||||
js_SetLocalVariable,
|
js_SetLocalVariable,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче