Closed
Bug 615940
Opened 15 years ago
Closed 15 years ago
Using Device Orientation events starts an immortal rapid timer
Categories
(Firefox for Android Graveyard :: General, defect)
Firefox for Android Graveyard
General
Tracking
(fennec2.0+)
RESOLVED
FIXED
| Tracking | Status | |
|---|---|---|
| fennec | 2.0+ | --- |
People
(Reporter: azakai, Assigned: azakai)
Details
Attachments
(1 file, 3 obsolete files)
|
6.84 KB,
patch
|
dougt
:
review+
|
Details | Diff | Splinter Review |
Visiting the test case attachment in bug 485943 will start device orientation events being fired. They will continue to fire at a fast rate (>10Hz I think) even after the page is browsed away from or even the tab closed.
| Assignee | ||
Updated•15 years ago
|
Assignee: nobody → azakai
tracking-fennec: --- → ?
Updated•15 years ago
|
tracking-fennec: ? → 2.0+
| Assignee | ||
Comment 1•15 years ago
|
||
Patch ties into the suspend/resume capabilities in nsGlobalWindow (for the bfcache), to suspend and resume accelerometer updates.
Attachment #494883 -
Flags: review?(doug.turner)
Comment 2•15 years ago
|
||
would it be easier to to just add and remove the window listener instead of having to manage mAccelerationUpdatesEnabled?
| Assignee | ||
Comment 3•15 years ago
|
||
Not sure what you mean - to use the existence of the window listener as an indicator of whether we currently have acceleration updates enabled? In other words, to expose the list of window listeners, and check if the current window is present there?
Comment 4•15 years ago
|
||
add a hasListener() method to nsIAccelerometer, then use that to store the state you are keeping now.
| Assignee | ||
Comment 5•15 years ago
|
||
Rewrote with those changes to the idl.
Will we still be able to have this for 4.0, with those interface changes?
Attachment #494883 -
Attachment is obsolete: true
Attachment #495133 -
Flags: review?(doug.turner)
Attachment #494883 -
Flags: review?(doug.turner)
| Assignee | ||
Updated•15 years ago
|
Attachment #495133 -
Flags: review?(doug.turner)
| Assignee | ||
Comment 6•15 years ago
|
||
This is what I should have done in the last patch.
Attachment #495133 -
Attachment is obsolete: true
Attachment #496051 -
Flags: review?(doug.turner)
Comment 7•15 years ago
|
||
Comment on attachment 496051 [details] [diff] [review]
better patch
I'd rather not have a macro. please remove ACCELEROMETER_ACTION.
Can you set mHasAcceleration in DisableAccelerationUpdates / EnableAccelerationUpdates instead of outside of it?
+ // Enable updates for the accelerometer.
+ void EnableAccelerationUpdates();
+
+ // Disables updates for the accelerometer.
+ void DisableAccelerationUpdates();
+
private
I think we passed the point where we can make IDL changes on interfaces.
How is this:
can you make the implementation of AddWindowListener / RemoveWindowListener check the parameter before doing anything? This would allow you to have the IDL consistency and get what you want.
Attachment #496051 -
Flags: review?(doug.turner) → review-
| Assignee | ||
Comment 8•15 years ago
|
||
Update with requested changes, except for
> Can you set mHasAcceleration in
> DisableAccelerationUpdates /
> EnableAccelerationUpdates instead of
> outside of it?
Enable/Disable is called frequently, as the page goes into and out of the bfcache. mHasAcceleration is set once for the page, when it is marked as having a need for acceleration updates. If it doesn't, then Enable/Disable will do nothing. So mHasAcceleration has to be set outside of Enable/Disable.
Attachment #496051 -
Attachment is obsolete: true
Attachment #500957 -
Flags: review?(doug.turner)
Updated•15 years ago
|
Attachment #500957 -
Flags: review?(doug.turner) → review+
Comment 9•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 10•14 years ago
|
||
Can someone verify this please? Or give me some hints on how to verify it?
| Assignee | ||
Comment 11•14 years ago
|
||
I don't think there is a reasonable way to test this manually.
You need to log in
before you can comment on or make changes to this bug.
Description
•