###!!! ASSERTION: SwitchSensor not thread-safe

RESOLVED FIXED in mozilla15

Status

()

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

People

(Reporter: gwagner, Assigned: cyu)

Tracking

unspecified
mozilla15
x86
Gonk (Firefox OS)
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
Gecko compiled in debug mode during startup on device:

I/Gecko   ( 2204): ###!!! ASSERTION: SwitchSensor not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()', file /Volumes/mac/moz/b2ggecko/hal/gonk/GonkSensor.cpp, line 204
(Assignee)

Comment 1

5 years ago
This is not really that bad as it looks. The use of NS_INLINE_DECL_REFCOUNTING() macro asserts it's in the same thread as when the object is created when refcounting. For objects to be passed as to another thread for execution using NS_NewRunnableMethod() this assertion will be triggered, though there actually is no underlying threading problems.
(Assignee)

Comment 2

5 years ago
Created attachment 626736 [details] [diff] [review]
Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads.
Attachment #626736 - Flags: review?(mwu)
(Assignee)

Comment 3

5 years ago
Created attachment 626741 [details] [diff] [review]
Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads.

Deprecate previous version, which Eclipse filled in wrong user.
Assignee: nobody → cyu
Attachment #626736 - Attachment is obsolete: true
Attachment #626736 - Flags: review?(mwu)
Attachment #626741 - Flags: review?(mwu)

Updated

5 years ago
Attachment #626741 - Flags: review?(mwu) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/3697e932626d
Keywords: checkin-needed
Target Milestone: --- → mozilla15

Comment 5

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