Closed Bug 1022705 Opened 6 years ago Closed 6 years ago

[Camera][Gecko] GonkCameraControl dtor has a worker thread dependency

Categories

(Firefox OS Graveyard :: Gaia::Camera, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S4 (20june)

People

(Reporter: mikeh, Assigned: mikeh)

References

Details

(Keywords: crash)

Attachments

(1 file)

Destructor path winds up here:
http://dxr.mozilla.org/mozilla-central/source/dom/camera/GonkCameraControl.cpp#1044

This assertion will fail if the GonkCameraControl object is destroyed on the Main Thread (or any other than the Camera Thread). Not sure what has caused this test to start failing all of a sudden
In short: only access 'mRecorder' inside a ReentrantMonitor.
Attachment #8437616 - Flags: review?(rjesup)
Comment on attachment 8437616 [details] [diff] [review]
Remove GonkCameraControl dtor thread dependency, v1

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

StopRecordingImpl() needs to grab the monitor around mRecorder there too

::: dom/camera/GonkCameraControl.cpp
@@ +953,5 @@
>  {
>    MOZ_ASSERT(NS_GetCurrentThread() == mCameraThread);
>  
> +  ReentrantMonitorAutoEnter mon(mRecorderMonitor);
> +  

trailing space
Attachment #8437616 - Flags: review?(rjesup) → review-
Comment on attachment 8437616 [details] [diff] [review]
Remove GonkCameraControl dtor thread dependency, v1

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

Never mind - is is there!
Attachment #8437616 - Flags: review- → review+
Fix nit and land with test_sandbox_permission.html reenabled.

https://hg.mozilla.org/integration/b2g-inbound/rev/81b8673cd537
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/81b8673cd537
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.0 S4 (20june)
Duplicate of this bug: 1023651
You need to log in before you can comment on or make changes to this bug.