Bug 1262661 - clear the MessageQueue after send. r=mconley, a=ritu

This commit is contained in:
Gabor Krizsanits 2016-05-03 22:38:36 +02:00
parent 991dfce3d8
commit 708412b84c

View File

@ -219,6 +219,13 @@ var SessionHistoryListener = {
// Collect data if we start with a non-empty shistory.
if (!SessionHistory.isEmpty(docShell)) {
this.collect();
// When a tab is detached from the window, for the new window there is a
// new SessionHistoryListener created. Normally it is empty at this point
// but in a test env. the initial about:blank might have a children in which
// case we fire off a history message here with about:blank in it. If we
// don't do it ASAP then there is going to be a browser swap and the parent
// will be all confused by that message.
MessageQueue.send();
}
// Listen for page title changes.
@ -713,6 +720,8 @@ var MessageQueue = {
}
}
this._data.clear();
durationMs = Date.now() - durationMs;
telemetry.FX_SESSION_RESTORE_CONTENT_COLLECT_DATA_LONGEST_OP_MS = durationMs;