Bug 1236827 - Remove non-useful 'delete' in TabStore.jsm, r=ttaubert

This commit is contained in:
Andrea Marchesini 2016-01-05 17:22:36 +00:00
Родитель 38b4594c7d
Коммит 5e1308efcc
1 изменённых файлов: 9 добавлений и 10 удалений

Просмотреть файл

@ -151,26 +151,25 @@ var TabStateInternal = {
* @returns {object} An object with the basic data for this tab.
*/
_collectBaseTabData: function (tab, options) {
let tabData = {entries: [], lastAccessed: tab.lastAccessed };
let tabData = { entries: [], lastAccessed: tab.lastAccessed };
let browser = tab.linkedBrowser;
if (tab.pinned)
if (tab.pinned) {
tabData.pinned = true;
else
delete tabData.pinned;
}
tabData.hidden = tab.hidden;
if (browser.audioMuted)
if (browser.audioMuted) {
tabData.muted = true;
else
delete tabData.muted;
}
// Save tab attributes.
tabData.attributes = TabAttributes.get(tab);
if (tab.__SS_extdata)
if (tab.__SS_extdata) {
tabData.extData = tab.__SS_extdata;
else if (tabData.extData)
delete tabData.extData;
}
// Copy data from the tab state cache only if the tab has fully finished
// restoring. We don't want to overwrite data contained in __SS_data.