diff --git a/src/css/devtool-log.css b/src/css/devtool-log.css index 5f269284f..f2e79221e 100644 --- a/src/css/devtool-log.css +++ b/src/css/devtool-log.css @@ -70,6 +70,7 @@ body:not(.filterOff) #content table tr.hidden { padding: 3px 0; text-align: center; white-space: pre; + width: 1em; } #content table tr td:nth-of-type(2) { white-space: normal; diff --git a/src/js/devtool-log.js b/src/js/devtool-log.js index 621e504e1..c36e12a02 100644 --- a/src/js/devtool-log.js +++ b/src/js/devtool-log.js @@ -141,6 +141,13 @@ var renderLogBuffer = function(buffer) { renderLogEntry(buffer[i]); } + // Prevent logger from growing infinitely and eating all memory. For + // instance someone could forget that it is left opened for some + // dynamically refreshed pages. + while ( tbody.childElementCount > 25000 ) { + rowJunkyard.push(tbody.removeChild(tbody.lastElementChild)); + } + var yDelta = tbody.offsetHeight - height; if ( yDelta === 0 ) { return; @@ -246,6 +253,7 @@ var unapplyFilter = function() { var onFilterButton = function() { uDom('body').toggleClass('filterOff'); + uDom('#filterExpression').nodeAt(0).focus(); }; /******************************************************************************/