Closed Bug 480894 Opened 12 years ago Closed 12 years ago
Browser ._draw Interval is never shut off when loading page via cmdline
During a pageload we throttle paint updates using a 2000ms interval (_drawInterval). This interval should be shut off when the page finishes loading. When loading a page via the commandline, like the Talos Ts test, the interval is never shut off. I am attaching a simple profile that was made long after startup, while Fennec was idling.
In my case, the HTML document was doing a document.write after it loaded. This caused a networkStart/networkStop pair, but no documentStop. ProgressListener.networkStart calls CanvasBrowser.startLoading, which can start the timer. ProgressListener.documentStop calls CanvasBrowser.endLoading, which wasn't getting called in this case, so the timer was never turned off.
This patch simply moves the call to endLoading into networkStop. I tested on desktop and device. The functionality still works as before - nothing appears broken. However, the timer is turned off.
Assignee: nobody → mark.finkle
Attachment #365385 - Flags: review?(tglek)
Attachment #365385 - Flags: review?(gavin.sharp)
Comment on attachment 365385 [details] [diff] [review] patch Fine with me if it fixes the immediate bug, but we should audit the events we're using here to make sure they mean what we want them to mean at some point (nsIWebProgressListener flags are confusing).
Attachment #365385 - Flags: review?(gavin.sharp) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.