Closed Bug 801801 Opened 7 years ago Closed 7 years ago

--runapp is broken

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set

Tracking

(firefox18 fixed)

RESOLVED FIXED
Tracking Status
firefox18 --- fixed

People

(Reporter: anant, Assigned: anant)

Details

Attachments

(1 file)

Bug 782862 implemented --runapp to launch the B2G desktop build with a specific app but this functionality does not work anymore. From IRC:

<altsuth> anant: the homescreen OOP landing seemed to cause a display race.  Although it does seem to trigger the app in question, the homescreen app seems to win the display battle
<altsuth> also, for the mozSettings bit, I'm not sure if the getLock to createLock transition happened for it
<altsuth> anant, I think a reasonable fix might be to still start the app as-is, but then also poking into the main display window and waiting on the iframe of the homescreen to report that it is loaded before triggering a second launch request so it gets displayed
<altsuth> (that way it can startup in parallel)
<dietrich> anant: yeah file a bug. you'll need approval to land a fix
<altsuth> the code is in b2g/chrome/content, so it's technically a b2g issue I think
I am loath to be using a magic number (100), but all my approaches have led to no success. The problem seems to be that there is no reliable way to know when the lockscreen has actually unlocked after setting the value via the settings API.

So, for now, this solution sort of works and the patch also fixes the problem where there was a small chance of accessing the app registry before it has initialized.
Assignee: nobody → anant
Status: NEW → ASSIGNED
Attachment #672119 - Flags: review?(bugmail)
Comment on attachment 672119 [details] [diff] [review]
setTimeout 100 for launch

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

r=me with comments addressed. Bonus points for disabling that on device builds!

::: b2g/chrome/content/runapp.js
@@ +1,4 @@
>  // runapp.js:
>  // Provide a --runapp APPNAME command-line option.
>  
> +"use strict";

move that above the comments.

@@ +7,2 @@
>  window.addEventListener('load', function() {
> +  Services.prefs.setBoolPref('browser.dom.window.dump.enabled', true);

remove, please
Attachment #672119 - Flags: review?(bugmail) → review+
Component: Gaia → General
https://hg.mozilla.org/mozilla-central/rev/e5447fb2a461
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Comment on attachment 672119 [details] [diff] [review]
setTimeout 100 for launch

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: No user impact, but is a developer convenience command for b2g-desktop that is very handy.  --runapp already exists on aurora, it's just broken
Testing completed (on m-c, etc.): Has been landed on m-c for ~2 weeks
Risk to taking this patch (and alternatives if risky): No risk, it's a b2g-desktop only.
String or UUID changes made by this patch:
Attachment #672119 - Flags: approval-mozilla-aurora?
Attachment #672119 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
landed on mozilla-aurora.  Thanks again Anant and Fabrice!
https://hg.mozilla.org/releases/mozilla-aurora/rev/7ac200b8286d
You need to log in before you can comment on or make changes to this bug.