mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Fix bug of IndexOutOfRangeException for
function query(query, text) {}
This commit is contained in:
parent
26d7203e07
commit
3300d508c9
@ -136,6 +136,17 @@ public class VariableTable {
|
||||
if (i != null) {
|
||||
itsVariables.removeElementAt(i.intValue());
|
||||
itsVariableNames.remove(name);
|
||||
Hashtable ht = new Hashtable(11);
|
||||
Enumeration e = itsVariableNames.keys();
|
||||
while (e.hasMoreElements()) {
|
||||
Object k = e.nextElement();
|
||||
Integer v = (Integer) itsVariableNames.get(k);
|
||||
int v2 = v.intValue();
|
||||
if (v2 > i.intValue())
|
||||
v = new Integer(v2 - 1);
|
||||
ht.put(k, v);
|
||||
}
|
||||
itsVariableNames = ht;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,6 +136,17 @@ public class VariableTable {
|
||||
if (i != null) {
|
||||
itsVariables.removeElementAt(i.intValue());
|
||||
itsVariableNames.remove(name);
|
||||
Hashtable ht = new Hashtable(11);
|
||||
Enumeration e = itsVariableNames.keys();
|
||||
while (e.hasMoreElements()) {
|
||||
Object k = e.nextElement();
|
||||
Integer v = (Integer) itsVariableNames.get(k);
|
||||
int v2 = v.intValue();
|
||||
if (v2 > i.intValue())
|
||||
v = new Integer(v2 - 1);
|
||||
ht.put(k, v);
|
||||
}
|
||||
itsVariableNames = ht;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user