Closed
Bug 1090501
Opened 10 years ago
Closed 10 years ago
[Camera][Gecko][Perf] Pre-emptively open camera hardware when certified app has 'camera' permission
Categories
(Firefox OS Graveyard :: Gaia::Camera, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2.1 S8 (7Nov)
People
(Reporter: mikeh, Assigned: mikeh)
References
Details
(Keywords: perf)
Attachments
(2 files, 5 obsolete files)
No description provided.
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8512977 -
Flags: review?(fabrice)
Comment 2•10 years ago
|
||
Comment on attachment 8512977 [details] [diff] [review]
Pre-emptively open camera hardware, v1
Review of attachment 8512977 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/camera/CameraPreferences.cpp
@@ +293,5 @@
> + if (strcmp(aTopic, "init-camera-hw") == 0) {
> + return PreinitCameraHardware();
> + }
> +
> + printf_stderr("Got unhandled topic '%s'\n", aTopic);
DOM_CAMERA_LOGE instead of printf_stderr?
::: dom/camera/DOMCameraManager.h
@@ +91,5 @@
>
> +#ifdef MOZ_WIDGET_GONK
> + static void PreinitCameraHardware();
> +#endif
> +
nit: whitespace
::: dom/ipc/TabChild.cpp
@@ +1837,5 @@
> + nsCOMPtr<nsIObserverService> observerService =
> + mozilla::services::GetObserverService();
> + observerService->NotifyObservers(nullptr, "init-camera-hw", nullptr);
> + }
> + }
This is needs to be improved a bit to:
- check if the app is certified
- add some checks on return values (secMan, NS_NewURI for instance).
Attachment #8512977 -
Flags: review?(fabrice) → feedback+
Assignee | ||
Comment 3•10 years ago
|
||
Incorporate review feedback.
Attachment #8512977 -
Attachment is obsolete: true
Attachment #8513805 -
Flags: review?(fabrice)
Comment 4•10 years ago
|
||
Comment on attachment 8513805 [details] [diff] [review]
Pre-emptively open camera hardware, v2
Review of attachment 8513805 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with nit fixed.
::: dom/ipc/TabChild.cpp
@@ +1826,5 @@
> +
> + uint16_t status = nsIPrincipal::APP_STATUS_NOT_INSTALLED;
> + principal->GetAppStatus(&status);
> + bool isCertified = status == nsIPrincipal::APP_STATUS_CERTIFIED;
> + if (NS_WARN_IF(!isCertified)) {
No need to warn here - nothing bad happened.
Attachment #8513805 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 5•10 years ago
|
||
(In reply to Fabrice Desré [:fabrice] from comment #4)
> No need to warn here - nothing bad happened.
Agreed. I was thinking I can probably remove the warning from the permissions check as well, for the same reason.
Assignee | ||
Comment 6•10 years ago
|
||
Incorporate review feedback, carrying r+ forward.
Attachment #8513805 -
Attachment is obsolete: true
Attachment #8515118 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Summary: [Camera][Gecko][Perf] Pre-emptively open camera hardware when app has 'camera' permission → [Camera][Gecko][Perf] Pre-emptively open camera hardware when certified app has 'camera' permission
Assignee | ||
Comment 7•10 years ago
|
||
Assignee | ||
Comment 8•10 years ago
|
||
And the missing headers that didn't break the unified build:
https://hg.mozilla.org/integration/b2g-inbound/rev/4cb1154b0190
Target Milestone: --- → 2.1 S8 (7Nov)
Comment 9•10 years ago
|
||
This conflicted with the backout of bug 1020368, so I had to back this out too :(
https://hg.mozilla.org/integration/b2g-inbound/rev/940af94c4bc6
Comment 10•10 years ago
|
||
Oh geez, this gets worse. Your bustage follow-up here fixed the non-unified bustage from that push too :(
So it sounds like you should roll the bustage fix here into whatever lands first and then we should be good to go. Sorry for the mess :(
Assignee | ||
Comment 11•10 years ago
|
||
Take 2, now with (hopefully) 100% less bustage:
https://hg.mozilla.org/integration/b2g-inbound/rev/036de9b00df6
Comment 12•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 13•10 years ago
|
||
This is breaking the camera app. The automation suite is failing because after opening the camera app a loading spinner is displayed and does not disappear. The issue is also reproduced manually 5 out of 5 attempts.
The tests first failed in the following Jenkins run:
http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.b2g-inbound.ui.functional.smoke/984/HTML_Report/
Is there another patch that should have landed together with this?
If not, please back out this patch.
Status: RESOLVED → REOPENED
Flags: needinfo?(cbook)
Resolution: FIXED → ---
Comment 14•10 years ago
|
||
This was tested on Flame 319MB shallow flash on top of v188-1.
I have attached the logcat from when I tried opening the app manually.
Comment 15•10 years ago
|
||
(In reply to Robert Chira [:RobertC] from comment #13)
> This is breaking the camera app. The automation suite is failing because
> after opening the camera app a loading spinner is displayed and does not
> disappear. The issue is also reproduced manually 5 out of 5 attempts.
>
> The tests first failed in the following Jenkins run:
> http://jenkins1.qa.scl3.mozilla.com/view/UI/job/flame-kk-319.b2g-inbound.ui.
> functional.smoke/984/HTML_Report/
>
> Is there another patch that should have landed together with this?
> If not, please back out this patch.
Per past discussions and agreements with QA, backout requests for regressions that don't impact our CI infrastructure should go first to the patch author and then another module peer. This is to minimize risks associated with other dependencies that may be currently unknown to people on our team. If a module peer isn't reachable and this is urgent (i.e. backout and respin nightlies ASAP because the phone is unusable), please let us know.
Redirecting the backout request to mike.
Thanks!
Flags: needinfo?(cbook) → needinfo?(mhabicher)
Comment 16•10 years ago
|
||
Confirmed this has broken camera app, with symptoms described in comment 13. Please backout.
Assignee | ||
Comment 18•10 years ago
|
||
It looks like the hardware is opening, but there is no initial configuration:
11-06 08:27:19.310 1370 1394 I PRLog : 1668288[b2679980]: CameraControlImpl::OnUserError : aContext='SetConfiguration' (8), aError=0x80004005
11-06 08:27:19.430 1370 1370 I PRLog : -1225137836[b434a080]: Camera mode still unspecified, nothing to do
11-06 08:27:19.430 1370 1370 I PRLog : -1225137836[b434a080]: DOM OnHardwareStateChange: open
This probably didn't show up in testing because the camera had already cached an initial configuration. Testing a fix now.
Comment 19•10 years ago
|
||
Attachment #8518301 -
Flags: review?(jdarcangelo)
Comment 20•10 years ago
|
||
Comment on attachment 8518301 [details] [review]
pull-request (master)
LGTM. Ship it!
Attachment #8518301 -
Flags: review?(jdarcangelo) → review+
Assignee | ||
Comment 21•10 years ago
|
||
Attachment #8518129 -
Attachment is obsolete: true
Attachment #8518316 -
Flags: review?(aosmond)
Updated•10 years ago
|
Attachment #8518316 -
Flags: review?(aosmond) → review+
Assignee | ||
Comment 22•10 years ago
|
||
Add header to patch file; carry r+ forward.
Attachment #8515118 -
Attachment is obsolete: true
Attachment #8518316 -
Attachment is obsolete: true
Attachment #8518345 -
Flags: review+
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 23•10 years ago
|
||
https://hg.mozilla.org/integration/b2g-inbound/rev/3c8491fb2572
Master: https://github.com/mozilla-b2g/gaia/commit/10ac5891c8e06e28dd7b1856032d118449ed611c
Keywords: checkin-needed
Status: REOPENED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•