Closed Bug 1167063 Opened 9 years ago Closed 9 years ago

Fail to boot-up if an app manifest contains 'widgetPages'.

Categories

(Core Graveyard :: DOM: Apps, defect)

x86
macOS
defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: chens, Assigned: CuveeHsu)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1164341 +++

We will get `JavaScript error: resource://gre/modules/AppsServiceChild.jsm, line 10: TypeError: list is undefined` when `widgetPages` exist in app mainfest, it will hang at mozilla logo and can't bootup properly.
Junior, I'm not sure which component it should belong, and could you help on it? thanks.
Flags: needinfo?(juhsu)
It could reproduce on b2g-desktop with tv build, try `make clean && make GAIA_DEVCE_TYPE=tv && b2g/b2g-bin -profile profile` to reproduce this.
Component: Gaia → DOM: Apps
Flags: needinfo?(juhsu)
Product: Firefox OS → Core
Summary: [Stingray][Dashboard] Skeleton of clock widget → Fail to boot-up if an app manifest contains 'widgetPages'.
I found two wired facts addressed below:

1. In a |sendSyncMessage|, the return value is an object in |receiveMessage|:
https://dxr.mozilla.org/mozilla-central/source/dom/apps/Webapps.jsm#1360
But get an empty array as a return value.
https://dxr.mozilla.org/mozilla-central/source/dom/apps/AppsServiceChild.jsm#117

2. |widgetPages| of |this.webapps| in webapps.jsm looks wired:

"widgetPages":[{"spec":"app://xxx.gaiamobile.org/widget.html","prePath":"app://xxx.gaiamobile.org","scheme":"app","userPass":"","username":"","password":"","hostPort":"xxx.gaiamobile.org","host":"xxx.gaiamobile.org","port":-1,"path":"/widget.html","asciiSpec":"app://xxx.gaiamobile.org/widget.html","asciiHost":"xxx.gaiamobile.org","originCharset":"UTF-8","ref":"","specIgnoringRef":"app://xxx.gaiamobile.org/widget.html","hasRef":false}]

That is not what I expect. Seems it's kinda |nsIURI| instead of a string.
Okay, |this.webapps.aApp.widgetPages| stores an array of |nsIURI|s for speedup.
However, |sendSyncMessage| could not allow to get |nsIURI| even if |nsIURI| is scriptable.

(I did experiments to substitute string for |nsIURI| and it can pass |sendSyncMessage|)
Since we need to use widgetPages in both parent and child process. We still need a way to sync widgetPages between Webapps.jsm and AppsServiceChild.jsm
Simply use string instead of nsIURI to avoid |sendSyncMessage(nsIURI)|

try result:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=4da14771a327
Assignee: nobody → juhsu
Attachment #8611068 - Flags: review?(fabrice)
Attachment #8611068 - Flags: review?(fabrice) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/2bd139a86f1b
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
See Also: → 1172441
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: