Closed Bug 1093457 Opened 11 years ago Closed 7 years ago

[Camera][Gecko] abort setConfiguration or startRecording call while another call is in progress

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: shinuk153, Assigned: shinuk153)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 Steps to reproduce: 1. start Camera 2. touch front/back camera switch button & video recording button at the same time Actual results: StartRecording error occurred; DOM OnUserError aContext=6, error='HardwareClosed' File descriptor was not closed. And cannot be connected as USB storage. Expected results: Aborting startRecording or setConfiguration call while previous setConfiguration or startRecording call is in progress
NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings. [Approval Request Comment] Bug caused by (feature/regressing bug #): User impact if declined: Testing completed: Risk to taking this patch (and alternatives if risky): String or UUID changes made by this patch:
Attachment #8516468 - Flags: review?(mhabicher)
Comment on attachment 8516468 [details] [diff] [review] abort_setconfiguration_startrecording_call Review of attachment 8516468 [details] [diff] [review]: ----------------------------------------------------------------- I will r+ if you make the corrections below: ::: dom/camera/DOMCameraControl.cpp @@ +1596,5 @@ > + if (mDSFileDescriptor->mFileDescriptor.IsValid()) { > + nsRefPtr<CloseFileRunnable> closer = > + new CloseFileRunnable(mDSFileDescriptor->mFileDescriptor); > + closer->Dispatch(); > + } We should only need to check this for the start recording failures, rather than every error. You should also remove the equivalent code (but copy the comments over) at nsDOMCameraControl::OnCreatedFileDescriptor since we don't need to do this twice.
Attachment #8516468 - Flags: review?(mhabicher)
I don't think we need below code block inside OnCreatedFileDescriptor, because CameraControlImpl::StartRecording returns no error even if nsGonkCameraControl::StartRecordingImpl returns an error. > OnUserError(CameraControlListener::kInStartRecording, rv); > if (mDSFileDescriptor->mFileDescriptor.IsValid()) { > // An error occured. We need to manually close the file associated with the > // FileDescriptor, and we shouldn't do this on the main thread, so we > // use a little helper. > nsRefPtr<CloseFileRunnable> closer = > new CloseFileRunnable(mDSFileDescriptor->mFileDescriptor); > closer->Dispatch(); > } but I only moved mDSFileDescriptorclose condition to OnUserError. Please find the attachment.
Attachment #8516468 - Attachment is obsolete: true
Attachment #8517148 - Flags: review?(aosmond)
Comment on attachment 8517148 [details] [diff] [review] abort_setconfiguration_startrecording_call Review of attachment 8517148 [details] [diff] [review]: ----------------------------------------------------------------- (In reply to shinuk from comment #3) > Created attachment 8517148 [details] [diff] [review] > abort_setconfiguration_startrecording_call > > I don't think we need below code block inside OnCreatedFileDescriptor, > because CameraControlImpl::StartRecording returns no error even if > nsGonkCameraControl::StartRecordingImpl returns an error. > > but I only moved mDSFileDescriptorclose condition to OnUserError. > > Please find the attachment. For the CameraControlImpl::StartRecording call, the dispatch to camera thread could fail in theory, so we check :).
Attachment #8517148 - Flags: review?(aosmond) → review+
Assignee: nobody → shinuk153
Firefox OS is not being worked on
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: