Closed Bug 826771 Opened 11 years ago Closed 11 years ago

pref-applicationManager.xul is broken because Services isn't defined in the scope.

Categories

(SeaMonkey :: Preferences, defect)

defect
Not set
normal

Tracking

(seamonkey2.15 fixed, seamonkey2.16 fixed, seamonkey2.17 fixed, seamonkey2.18 fixed)

RESOLVED FIXED
seamonkey2.18
Tracking Status
seamonkey2.15 --- fixed
seamonkey2.16 --- fixed
seamonkey2.17 --- fixed
seamonkey2.18 --- fixed

People

(Reporter: philip.chee, Assigned: philip.chee)

References

Details

Attachments

(1 file)

Sat Jan 05 2013 02:11:49
Error: ReferenceError: Services is not defined
Source file: chrome://communicator/content/pref/pref-applications.js
Line: 1696

Stefanh also sees these additional errors.
JavaScript strict warning: chrome://communicator/content/pref/pref-applications.js, line 1147: reference to undefined property this._visibleTypeDescriptionCount[aHandlerInfo.description]
JavaScript error: chrome://communicator/content/pref/pref-applications.js, line 1683: Services is not defined
JavaScript strict warning: chrome://communicator/content/pref/pref-applicationManager.js, line 59: reference to undefined property list.selectedItem.app

This is caused by pref-applicationManager.xul using pref-applications.js which assumes that Services.jsm has been loaded.

The following fixes the Services issue:

--- pref-applicationManager0.js	Fri Jan 01 00:00:00 2010
+++ pref-applicationManager.js	Sat Jan 05 02:22:26 2013
@@ -1,14 +1,16 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 // As pref-applications.js is always loaded, we can (and should!) reuse
 // the nsI* constants from there, if needed also any services we need.
 
+Components.utils.import("resource://gre/modules/Services.jsm");
+
 var gAppManagerDialog = {
   _removed: [],
 
   init: function appManager_init() {
     this.handlerInfo = window.arguments[0];
 
     var bundle = document.getElementById("appManagerBundle");
Blocks: 667662, 667674
Before Philip's suggested patch, I couldn't remove an (feed) app I've added to the list of apps in the helper apps pane - hitting OK just wouldn't do anything at all (forced to use the canel button). Now I can remove an app from the list, but if I close the prefwindow and open it again, the app reappears in the list.
For more details regarding my issues, see https://bugzilla.mozilla.org/show_bug.cgi?id=824272#c3 (most of them except no 2 are probably unrelated to this bug)
Assignee: nobody → philip.chee
Status: NEW → ASSIGNED
Attachment #702283 - Flags: review?(iann_bugzilla)
Attachment #702283 - Flags: review?(iann_bugzilla) → review+
Pushed to comm-central:
http://hg.mozilla.org/comm-central/rev/507de3e54b36
Comment on attachment 702283 [details] [diff] [review]
Patch v1.0 import Services.jsm

Bug 667662 and Bug 667674 landed on SeaMonkey 2.4 eek!

[Approval Request Comment]
Regression caused by (bug #): Bug 667662 and Bug 667674.
User impact if declined: broken applications pref-pane.
Testing completed (on m-c, etc.): tested on comm-central.
Risk to taking this patch (and alternatives if risky): low risk, bustage fix.
String changes made by this patch: None.
Attachment #702283 - Flags: approval-comm-release?
Attachment #702283 - Flags: approval-comm-beta?
Attachment #702283 - Flags: approval-comm-aurora?
Comment on attachment 702283 [details] [diff] [review]
Patch v1.0 import Services.jsm

a=me, I'll leave the rel eng team to make a decision on comm-release
Attachment #702283 - Flags: approval-comm-beta?
Attachment #702283 - Flags: approval-comm-beta+
Attachment #702283 - Flags: approval-comm-aurora?
Attachment #702283 - Flags: approval-comm-aurora+
Target Milestone: --- → seamonkey2.18
Attachment #702283 - Flags: approval-comm-release? → approval-comm-release+
Pushed to comm-release:
http://hg.mozilla.org/releases/comm-release/rev/2ba7869026e0
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.