mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Fix middle-delete-function-with-duplicate-formals (170193, r=shaver).
This commit is contained in:
parent
1c0ddbd1ae
commit
42b7fa026d
@ -1020,9 +1020,11 @@ js_AddScopeProperty(JSContext *cx, JSScope *scope, jsid id,
|
||||
* object) scope. Count remaining ancestors in order
|
||||
* to realloc spvec.
|
||||
*/
|
||||
JSScopeProperty *tmp = sprop;
|
||||
do {
|
||||
i++;
|
||||
} while ((sprop = sprop->parent) != NULL);
|
||||
if (SCOPE_GET_PROPERTY(scope, tmp->id))
|
||||
i++;
|
||||
} while ((tmp = tmp->parent) != NULL);
|
||||
spp2 = (JSScopeProperty **)
|
||||
JS_realloc(cx, spvec,
|
||||
(splen + i) * sizeof(JSScopeProperty *));
|
||||
@ -1035,7 +1037,6 @@ js_AddScopeProperty(JSContext *cx, JSScope *scope, jsid id,
|
||||
memmove(spvec + i, spvec,
|
||||
splen * sizeof(JSScopeProperty *));
|
||||
splen += i;
|
||||
sprop = spvec[i];
|
||||
}
|
||||
|
||||
spvec[--i] = sprop;
|
||||
|
Loading…
Reference in New Issue
Block a user