Closed Bug 480894 Opened 12 years ago Closed 12 years ago

CanvasBrowser._drawInterval is never shut off when loading page via cmdline

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: mfinkle)

Details

Attachments

(2 files)

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.
Attached patch patchSplinter Review
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)
Attachment #365385 - Flags: review?(tglek) → review+
Comment on attachment 365385 [details] [diff] [review]
patch

looks good to me
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+
http://hg.mozilla.org/mobile-browser/rev/49bf26e1de09
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.