Closed Bug 753134 Opened 12 years ago Closed 12 years ago

B2G bluetooth interface crashes when trying to remove non-existent dbus watch sockets

Categories

(Core :: DOM: Device Interfaces, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla15

People

(Reporter: qdot, Assigned: qdot)

References

Details

Attachments

(1 file)

If gecko with bluetooth enabled starts up after bluetooth has already come up, then turning bluetooth off causes a request that makes the watch manager try to remove a socket that doesn't exist, crashing the browser.
Comment on attachment 622166 [details] [diff] [review]
Fix crash due to lack of index check on watch sockets

Review of attachment 622166 [details] [diff] [review]:
-----------------------------------------------------------------

::: ipc/dbus/DBusThread.cpp
@@ +311,5 @@
> +  // There are times where removes can be requested for watches that
> +  // haven't been added, so check to make sure we're using the watch
> +  // in the first place
> +  if(index >= 0)
> +  {

if (index < 0)
  return;

Also an example of when this might happen would be nice.
Attachment #622166 - Flags: review?(mwu) → review+
http://hg.mozilla.org/integration/mozilla-inbound/rev/ab315de0070f
Assignee: kyle → nobody
Component: DOM: Device Interfaces → DOM: CSS Object Model
QA Contact: device-interfaces → style-system
Component: DOM: CSS Object Model → DOM: Device Interfaces
QA Contact: style-system → device-interfaces
https://hg.mozilla.org/mozilla-central/rev/ab315de0070f
Assignee: nobody → kyle
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: