Closed Bug 933083 Opened 6 years ago Closed 6 years ago

Refactor connections into app-actor-front

Categories

(DevTools :: WebIDE, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 28

People

(Reporter: jryans, Assigned: jryans)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

DRY up the code by moving client.request calls into app-actor-front.
This centralizes some repeated code into app-actor-front.  Also, calls that rely on the device are guarded with connection checks.
Attachment #825041 - Flags: review?(poirot.alex)
Comment on attachment 825041 [details] [diff] [review]
Refactor app requests into app-actor-front

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

r+ but if, and only if you also add:
 get connected() { return !!this.listTabsResponse; },
to projects.js ;)

::: browser/devtools/app-manager/content/projects.js
@@ +302,4 @@
>  
>    debug: function(button, location) {
> +    if (!this.connected) {
> +      return;

You should also return a rejected promise here.
Attachment #825041 - Flags: review?(poirot.alex) → review+
(In reply to Alexandre Poirot (:ochameau) from comment #2)
> r+ but if, and only if you also add:
>  get connected() { return !!this.listTabsResponse; },
> to projects.js ;)

Sorry for the confusion, that was in the previous patch from bug 933025, but that hasn't landed, so I understand your concern. :)
Depends on: 933025
Carrying over r+ from attachment 825041 [details] [diff] [review].

(In reply to Alexandre Poirot (:ochameau) from comment #2) 
> ::: browser/devtools/app-manager/content/projects.js
> @@ +302,4 @@
> >  
> >    debug: function(button, location) {
> > +    if (!this.connected) {
> > +      return;
> 
> You should also return a rejected promise here.

Added.

Try: https://tbpl.mozilla.org/?tree=Try&rev=6e067dc84e10
Attachment #825041 - Attachment is obsolete: true
Attachment #826126 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/81e276c73ede
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 28
Whiteboard: [qa-]
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.