mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 755771 - Part 2: Send purge count to Java. r=mfinkle
This commit is contained in:
parent
5799c814ae
commit
dcd4566ae8
@ -455,8 +455,14 @@ public final class Tab {
|
||||
}
|
||||
mHistoryIndex = index;
|
||||
} else if (event.equals("Purge")) {
|
||||
mHistorySize = 0;
|
||||
mHistoryIndex = -1;
|
||||
int numEntries = message.getInt("index");
|
||||
mHistorySize -= numEntries;
|
||||
mHistoryIndex -= numEntries;
|
||||
if (mHistorySize < 0 || mHistoryIndex < -1) {
|
||||
Log.e(LOGTAG, "Unexpected history state: index = " + mHistoryIndex + ", size = " + mHistorySize);
|
||||
mHistorySize = 0;
|
||||
mHistoryIndex = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2340,7 +2340,7 @@ Tab.prototype = {
|
||||
},
|
||||
|
||||
OnHistoryPurge: function(aNumEntries) {
|
||||
this._sendHistoryEvent("Purge", -1, null);
|
||||
this._sendHistoryEvent("Purge", aNumEntries, null);
|
||||
return true;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user