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

RESOLVED FIXED in mozilla15

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: qdot, Assigned: qdot)

Tracking

Trunk
mozilla15
All
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

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.
Created attachment 622166 [details] [diff] [review]
Fix crash due to lack of index check on watch sockets
Attachment #622166 - Flags: review?(mwu)

Comment 2

5 years ago
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

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/ab315de0070f
Assignee: nobody → kyle
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.