Closed Bug 983610 Opened 11 years ago Closed 11 years ago

The developer HUD doesn't work for certified apps

Categories

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

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S1 (9may)

People

(Reporter: janx, Assigned: janx)

References

Details

Attachments

(1 file, 3 obsolete files)

Currently, most of the developer HUD widgets don't work for certified apps unless you set the "devtools.debugger.forbid-certified-apps" pref to false. To fix this, the developer HUD needs to bypass the webapps actor by getting frame actors directly from `DebuggerServer.connectToChild(conn, mm, onDisconnect)`.
Depends on: 983618
Comment on attachment 8391382 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau Review of attachment 8391382 [details] [diff] [review]: ----------------------------------------------------------------- This bypasses the webapps actor completely, and mostly works. Mostly, because of bug #983618's race condition for in-process apps (e.g. the keyboard), hence my asking for feedback and not review. Sadly, this can't land before bug #983618 is fixed.
Attachment #8391382 - Flags: feedback?(poirot.alex)
Comment on attachment 8391382 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau Review of attachment 8391382 [details] [diff] [review]: ----------------------------------------------------------------- Looks good! ::: b2g/chrome/content/devtools.js @@ +66,1 @@ > this._client.connect((type, traits) => { Do we even have to call connect? (tbh, I don't know!)
Attachment #8391382 - Flags: feedback?(poirot.alex) → feedback+
Attachment #8391382 - Attachment is obsolete: true
(In reply to Alexandre Poirot (:ochameau) from comment #3) > Looks good! Thanks! Actually after rebasing it even looks like the race condition went away, I'm not sure what happened but I'll investigate. > ::: b2g/chrome/content/devtools.js > @@ +66,1 @@ > > this._client.connect((type, traits) => { > > Do we even have to call connect? (tbh, I don't know!) I think you're right, connect[1] seems to only call `transport.ready()` and then set `this.traits` when connected. In our case `transport` is a LocalDebuggerTransport created by `DebuggerServer.connectPipe()` so it has an empty ready[2] method. No point in calling it. [1] DebuggerClient.connect: http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/client/dbg-client.jsm#362-371 [2] LocalDebuggerTransport.ready: http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/transport.js#288
(In reply to Jan Keromnes [:janx] from comment #5) > Thanks! Actually after rebasing it even looks like the race condition went > away, I'm not sure what happened but I'll investigate. Apparently the keyboard app switched to being remote instead of inprocess, so the HUD now works there. Since the problem affects inprocess frames, it still happens for the browser. Are there other inprocess apps left in firefox os?
Blocks: 987154
Attachment #8394206 - Attachment is obsolete: true
Comment on attachment 8394206 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau This patch greatly improves the situation, because no workaround is needed for certified apps anymore. I filed bug #987154 for the browser app issue, so that it can be addressed as a follow-up.
Attachment #8394206 - Flags: review?(poirot.alex)
Comment on attachment 8395686 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau Sorry, wrong attachment.
Attachment #8395686 - Flags: review?(poirot.alex)
Attachment #8394206 - Flags: review?(poirot.alex)
Comment on attachment 8395686 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau Review of attachment 8395686 [details] [diff] [review]: ----------------------------------------------------------------- Looks good! ::: b2g/chrome/content/devtools.js @@ +62,5 @@ > } > > + let transport = DebuggerServer.connectPipe(); > + this._conn = transport._serverConnection; > + this._client = new DebuggerClient(transport); It would be handy to add a comment about out "kind of special" usage of DebuggerServer! Something like: "We instanciate a local debugger connection, in order to later query apps tab actors like webconsole actor. Note the special usage of _serverConnection debugger server internal. This is meants to be given to DebuggerServer.connectToChild, just to make it work as it requires a connection to pipe child process actors messages to the parent process, and will allow to query apps tab actors on our DebuggerClient instance!" But please, feel free to document it with your own words!!
Attachment #8395686 - Flags: review?(poirot.alex) → review+
Comment on attachment 8396342 [details] [diff] [review] Make the developer HUD work for certified apps. r=ochameau Thanks for the r+! I added a comment to explain the _serverConnection trick.
Attachment #8396342 - Flags: review+
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
hi, sorry had to back this out in https://tbpl.mozilla.org/?rev=9afe2a1145bd since one of this 3 pushes seems to have caused Bug 986173
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
We disabled the test for now since it seems to just be sensitive to devtools changes in general. https://hg.mozilla.org/integration/fx-team/rev/f4e0eb9671c8
Whiteboard: [fixed-in-fx-team]
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → 1.5 S1 (9may)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: