Closed
Bug 740252
Opened 13 years ago
Closed 13 years ago
EventListenerManager disables various things in RemoveEventListener even if there can be still listeners
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: smaug, Assigned: dougt)
References
Details
Attachments
(1 file, 4 obsolete files)
|
4.59 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
One shouldn't call window->Disable* if there are still listeners for those features.
| Reporter | ||
Comment 1•13 years ago
|
||
Oh, and coding style is
if (expr) {
stmt;
}
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → doug.turner
Comment 3•13 years ago
|
||
Is this enough to fix the bug?
Assignee: doug.turner → jwein
Attachment #610441 -
Flags: feedback?(bugs)
Updated•13 years ago
|
Assignee: jwein → doug.turner
Updated•13 years ago
|
Attachment #610441 -
Attachment is obsolete: true
Attachment #610441 -
Flags: feedback?(bugs)
| Assignee | ||
Comment 4•13 years ago
|
||
style improvements.
Attachment #610439 -
Attachment is obsolete: true
Attachment #610439 -
Flags: review?(bugs)
Attachment #610453 -
Flags: review?(bugs)
| Assignee | ||
Comment 5•13 years ago
|
||
Attachment #610453 -
Attachment is obsolete: true
Attachment #610453 -
Flags: review?(bugs)
Attachment #610461 -
Flags: review?(bugs)
| Assignee | ||
Comment 6•13 years ago
|
||
Attachment #610461 -
Attachment is obsolete: true
Attachment #610461 -
Flags: review?(bugs)
Attachment #610464 -
Flags: review?(bugs)
| Reporter | ||
Comment 7•13 years ago
|
||
Comment on attachment 610464 [details] [diff] [review]
patch v.3
>+nsEventListenerManager::DisableDevice(PRUint32 aType)
>+{
>+ nsPIDOMWindow* window = GetInnerWindowForTarget();
>+ if (!window) {
>+ return;
>+ }
>+ if (aType == NS_DEVICE_ORIENTATION) {
>+ window->DisableDeviceSensor(SENSOR_ORIENTATION);
>+ } else if (aType == NS_DEVICE_MOTION) {
>+ window->DisableDeviceSensor(SENSOR_ACCELERATION);
>+ window->DisableDeviceSensor(SENSOR_LINEAR_ACCELERATION);
>+ window->DisableDeviceSensor(SENSOR_GYROSCOPE);
>+ }
>+}
This could also use switch-case
Attachment #610464 -
Flags: review?(bugs) → review+
Comment 8•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in
before you can comment on or make changes to this bug.
Description
•