Last Comment Bug 758096 - ###!!! ASSERTION: SwitchSensor not thread-safe
: ###!!! ASSERTION: SwitchSensor not thread-safe
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Device Interfaces (show other bugs)
: unspecified
: x86 Gonk (Firefox OS)
: -- normal (vote)
: mozilla15
Assigned To: Cervantes Yu [:cyu] [:cervantes]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-23 19:12 PDT by Gregor Wagner [:gwagner]
Modified: 2012-05-25 08:21 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads. (980 bytes, patch)
2012-05-24 02:10 PDT, Cervantes Yu [:cyu] [:cervantes]
no flags Details | Diff | Review
Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads. (972 bytes, patch)
2012-05-24 02:42 PDT, Cervantes Yu [:cyu] [:cervantes]
mwu.code: review+
Details | Diff | Review

Description Gregor Wagner [:gwagner] 2012-05-23 19:12:33 PDT
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
Comment 1 Cervantes Yu [:cyu] [:cervantes] 2012-05-24 01:31:44 PDT
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.
Comment 2 Cervantes Yu [:cyu] [:cervantes] 2012-05-24 02:10:36 PDT
Created attachment 626736 [details] [diff] [review]
Don't use NS_INLINE_DECL_REFCOUNTING() for classes to be passed between threads.
Comment 3 Cervantes Yu [:cyu] [:cervantes] 2012-05-24 02:42:38 PDT
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.
Comment 4 Kan-Ru Chen [:kanru] (UTC+8) 2012-05-25 00:58:19 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/3697e932626d
Comment 5 Ed Morley [:emorley] 2012-05-25 08:21:02 PDT
https://hg.mozilla.org/mozilla-central/rev/3697e932626d

Note You need to log in before you can comment on or make changes to this bug.