Closed Bug 1016924 Opened 10 years ago Closed 10 years ago

[appmgr v2] support non-device runtimes

Categories

(DevTools Graveyard :: WebIDE, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 32

People

(Reporter: paul, Assigned: paul)

References

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
Attached patch v1 (obsolete) — Splinter Review
Attachment #8429996 - Flags: review?(poirot.alex)
Blocks: build-am2
Comment on attachment 8429996 [details] [diff] [review]
v1

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

Does that mean we can have adb helper devices AND connecting to custom ip:port ?!
yes => \o/

Otherwise, I'm not sure it is relevant to expose connecting to firefox itself.
What about pref it off or something?

::: browser/devtools/webide/modules/app-manager.js
@@ +41,5 @@
>      this.onWebAppsStoreready = this.onWebAppsStoreready.bind(this);
>      this.webAppsStore = new WebappsStore(this.connection);
>      this.webAppsStore.on("store-ready", this.onWebAppsStoreready);
>  
> +    this.runtimeList = {usb: [], simulator: [], custom: [gLocalRuntime, gRemoteRuntime]};

Are you sure we are ready to expose local runtime access by default?
It looks like something useful for us for testing but may be misleading for most people discovering webide.
What about keeping it behind a pref?

@@ +280,5 @@
> +    try {
> +      this.selectedRuntime.connect(this.connection).then(
> +        () => {},
> +        () => {deferred.reject()});
> +    } catch(e) {}

Shouldn't we reject the promise in case of exception?

::: browser/devtools/webide/modules/runtimes.js
@@ +19,5 @@
> +  connect: function(connection) {
> +    let device = Devices.getByName(this.id);
> +    if (!device) {
> +      console.error("Can't find device: " + id);
> +      return promise.reject();

Shouldn't we reject the promise with this message?
Shouldn't we show an error in UI instead of console.error?

::: toolkit/devtools/server/actors/webapps.js
@@ +798,5 @@
>  
>      let deferred = promise.defer();
>  
> +    if (Services.appinfo.ID != "{3c2e2abc-06d4-11e1-ac3b-374f68613e61}") {
> +      return { error: "notB2G",

s/notB2G/notSupported/
Attachment #8429996 - Flags: review?(poirot.alex) → review+
(In reply to Alexandre Poirot (:ochameau) from comment #2)
> Comment on attachment 8429996 [details] [diff] [review]
> v1
> 
> Review of attachment 8429996 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Does that mean we can have adb helper devices AND connecting to custom
> ip:port ?!
> yes => \o/

Yep.

> Otherwise, I'm not sure it is relevant to expose connecting to firefox
> itself.
> What about pref it off or something?

Ok.

> ::: browser/devtools/webide/modules/app-manager.js
> @@ +41,5 @@
> >      this.onWebAppsStoreready = this.onWebAppsStoreready.bind(this);
> >      this.webAppsStore = new WebappsStore(this.connection);
> >      this.webAppsStore.on("store-ready", this.onWebAppsStoreready);
> >  
> > +    this.runtimeList = {usb: [], simulator: [], custom: [gLocalRuntime, gRemoteRuntime]};
> 
> Are you sure we are ready to expose local runtime access by default?
> It looks like something useful for us for testing but may be misleading for
> most people discovering webide.
> What about keeping it behind a pref?

Ok.

> @@ +280,5 @@
> > +    try {
> > +      this.selectedRuntime.connect(this.connection).then(
> > +        () => {},
> > +        () => {deferred.reject()});
> > +    } catch(e) {}
> 
> Shouldn't we reject the promise in case of exception?

Done.

> ::: browser/devtools/webide/modules/runtimes.js
> @@ +19,5 @@
> > +  connect: function(connection) {
> > +    let device = Devices.getByName(this.id);
> > +    if (!device) {
> > +      console.error("Can't find device: " + id);
> > +      return promise.reject();
> 
> Shouldn't we reject the promise with this message?
> Shouldn't we show an error in UI instead of console.error?

Done.

> ::: toolkit/devtools/server/actors/webapps.js
> @@ +798,5 @@
> >  
> >      let deferred = promise.defer();
> >  
> > +    if (Services.appinfo.ID != "{3c2e2abc-06d4-11e1-ac3b-374f68613e61}") {
> > +      return { error: "notB2G",
> 
> s/notB2G/notSupported/

Done.
Attached patch v1.1 (obsolete) — Splinter Review
Addressed comments.
Assignee: nobody → paul
Attachment #8429996 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8430691 - Flags: review+
Attached patch v1.2Splinter Review
Fixes xpcshell failure.

https://tbpl.mozilla.org/?tree=Try&rev=afcd957f12e9
Attachment #8430691 - Attachment is obsolete: true
Attachment #8430743 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/64d5937a15d0
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 32
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: