Closed Bug 818674 Opened 12 years ago Closed 12 years ago

"ReferenceError: manifest is not defined" in Webapps.jsm inline function readCSPs

Categories

(Core Graveyard :: DOM: Apps, defect, P2)

x86_64
Windows 7
defect

Tracking

(blocking-basecamp:+, firefox18 fixed, firefox19 fixed, firefox20 fixed, b2g18 fixed)

RESOLVED FIXED
B2G C2 (20nov-10dec)
blocking-basecamp +
Tracking Status
firefox18 --- fixed
firefox19 --- fixed
firefox20 --- fixed
b2g18 --- fixed

People

(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file)

I'm trying to track down an issue that makes a test fail for SeaMonkey:

http://tinderbox.mozilla.org/showlog.cgi?log=SeaMonkey/1354721294.1354722510.10832.gz

3 ERROR TEST-UNEXPECTED-FAIL | /tests/dom/tests/mochitest/webapps/test_bug_779982.html | getSelf() for app should return something - got failure, expected success

I can reproduce this 100% locally (Win 7 x64), but only on the first run from the console. When reloading the test page, all tests succeed.

I also found that the following error is issued directly before the above:

* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'ReferenceError: manifest is not defined' when calling method: [nsIRequestObserver::onStopRequest]"  nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)"  location: "native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0"  data: no]

Looking at the Error Console I got even more:

Error: DOMApplicationRegistry: Could not parse JSON: c:\users\jens\appdata\local\temp\tmphhhaqq\webapps\http_example_org\manifest.webapp ReferenceError: manifest is not defined
registerManifest@resource://gre/modules/Webapps.jsm:149
readCSPs@resource://gre/modules/Webapps.jsm:150
@resource://gre/modules/Webapps.jsm:1081
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1083
@resource://gre/modules/Webapps.jsm:1102
@resource://gre/modules/Webapps.jsm:305
NetUtil_asyncOpen/<.onStopRequest@resource://gre/modules/NetUtil.jsm:140

Source File: resource://gre/modules/Webapps.jsm
Line: 308

Looking at Webapps.jsm I think I found the source of the problem:
http://mxr.mozilla.org/comm-central/source/mozilla/dom/apps/src/Webapps.jsm#156

AFAICS, "manifest" is not defined in the context of readCSPs(). It should probably be "aResult.manifest" instead, like in _processManifestForIds():
http://mxr.mozilla.org/comm-central/source/mozilla/dom/apps/src/Webapps.jsm#494

If I'm wrong, please explain what's going on here.
That looks right. Can you make a patch?
Attached patch patchSplinter Review
Unfortunately this doesn't fix the test for me, but I intentionally didn't make that a hard dependency here. ;-)
Assignee: nobody → jh
Status: NEW → ASSIGNED
Attachment #689248 - Flags: review?(fabrice)
Attachment #689248 - Flags: review?(fabrice) → review+
blocking-basecamp: --- → +
Priority: -- → P2
Target Milestone: --- → B2G C2 (20nov-10dec)
https://hg.mozilla.org/mozilla-central/rev/3ecb45f153ac
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Whiteboard: [qa-] → [qa-][status-b2g18:fixed]
Whiteboard: [qa-][status-b2g18:fixed] → [qa-]
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: