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

RESOLVED FIXED in Firefox 18

Status

Core Graveyard
DOM: Apps
P2
normal
RESOLVED FIXED
5 years ago
2 months ago

People

(Reporter: InvisibleSmiley, Assigned: InvisibleSmiley)

Tracking

Trunk
B2G C2 (20nov-10dec)
x86_64
Windows 7

Firefox Tracking Flags

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

Details

(Whiteboard: [qa-])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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?
(Assignee)

Comment 2

5 years ago
Created attachment 689248 [details] [diff] [review]
patch

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)
(Assignee)

Comment 3

5 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/3ecb45f153ac
Blocks: 773891

Comment 4

5 years ago
https://hg.mozilla.org/mozilla-central/rev/3ecb45f153ac
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED

Updated

5 years ago
Whiteboard: [qa-]
https://hg.mozilla.org/releases/mozilla-aurora/rev/936fee75b9f2
https://hg.mozilla.org/releases/mozilla-beta/rev/f786ed0aea2a
status-firefox18: --- → fixed
status-firefox19: --- → fixed
status-firefox20: --- → fixed
Whiteboard: [qa-] → [qa-][status-b2g18:fixed]
status-b2g18: --- → fixed
Whiteboard: [qa-][status-b2g18:fixed] → [qa-]

Updated

2 months ago
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.