mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-02 00:42:45 +01:00
fix the undue discarding of logger events in edge cases
This commit is contained in:
parent
b23a0e918f
commit
b61fb331de
@ -546,8 +546,8 @@ var renderLogEntry = function(entry) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
rowFilterer.filterOne(tr, true);
|
rowFilterer.filterOne(tr, true);
|
||||||
|
|
||||||
tbody.insertBefore(tr, tbody.firstChild);
|
tbody.insertBefore(tr, tbody.firstChild);
|
||||||
|
return tr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
@ -565,14 +565,16 @@ var renderLogEntries = function(response) {
|
|||||||
|
|
||||||
var tabIds = response.tabIds;
|
var tabIds = response.tabIds;
|
||||||
var n = entries.length;
|
var n = entries.length;
|
||||||
var entry;
|
var entry, tr;
|
||||||
for ( var i = 0; i < n; i++ ) {
|
for ( var i = 0; i < n; i++ ) {
|
||||||
entry = entries[i];
|
entry = entries[i];
|
||||||
// Unlikely, but it may happen
|
tr = renderLogEntry(entries[i]);
|
||||||
|
// https://github.com/gorhill/uBlock/issues/1613#issuecomment-217637122
|
||||||
|
// Unlikely, but it may happen: mark as void if associated tab no
|
||||||
|
// longer exist.
|
||||||
if ( entry.tab && tabIds.hasOwnProperty(entry.tab) === false ) {
|
if ( entry.tab && tabIds.hasOwnProperty(entry.tab) === false ) {
|
||||||
continue;
|
tr.classList.remove('canMtx');
|
||||||
}
|
}
|
||||||
renderLogEntry(entries[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prevent logger from growing infinitely and eating all memory. For
|
// Prevent logger from growing infinitely and eating all memory. For
|
||||||
|
Loading…
Reference in New Issue
Block a user