Closed Bug 297223 Opened 19 years ago Closed 19 years ago

New extensions without chrome.manifest (no chrome at all) don't work

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: benjamin, Assigned: robert.strong.bugs)

References

Details

If an extension doesn't have any chrome at all (see bug 296855), EM won't
install it because it tries and fails to upgrade from old-style <em:file> to
new-style chrome.manifest.

Suggested solution:
If chrome.manifest is missing, try upgrading old chrome. If there are no
<em:file> arcs, write an empty chrome.manifest.
I wasn't able to reproduce this... I used the patch from bug 296855 and it
worked without any issues. I also deleted the chrome.manifest and tried it again
with a new profile without any problems. The only thing I can think of is that
you need write access to be able to create the chrome.manifest when an extension
has been added to the app's extensions directory but I doubt that is the cause.
The associated code from upgradeExtensionChrome is:
// Even if an extension doesn't have any chrome, we generate an empty
// manifest file so that we don't try to upgrade from the "old-style"
// chrome manifests at every startup.
manifestFile.create(nsILocalFile.NORMAL_FILE_TYPE, PERMS_FILE);

var manifestURI = getURIFromFile(manifestFile);
var files = this.metadataDS.GetTargets(gInstallManifestRoot, EM_R("file"), true);
while (files.hasMoreElements()) {
<snip>

The catch here dumps the exception as well which may shed some more light.
ok, I can't reproduce this either now. Maybe it was a misspelling in the source
that I fixed during development which confused the EM.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Component: XRE Startup → Startup and Profile System
QA Contact: nobody → startup
You need to log in before you can comment on or make changes to this bug.