Last Comment Bug 826771 - pref-applicationManager.xul is broken because Services isn't defined in the scope.
: pref-applicationManager.xul is broken because Services isn't defined in the s...
Product: SeaMonkey
Classification: Client Software
Component: Preferences (show other bugs)
: Trunk
: All All
-- normal (vote)
: seamonkey2.18
Assigned To: Philip Chee
Depends on:
Blocks: 667662 667674
  Show dependency treegraph
Reported: 2013-01-04 10:39 PST by Philip Chee
Modified: 2013-02-02 20:54 PST (History)
2 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---

Patch v1.0 import Services.jsm (1.13 KB, patch)
2013-01-15 06:36 PST, Philip Chee
iann_bugzilla: review+
iann_bugzilla: approval‑comm‑aurora+
iann_bugzilla: approval‑comm‑beta+
bugspam.Callek: approval‑comm‑release+
Details | Diff | Splinter Review

Description User image Philip Chee 2013-01-04 10:39:14 PST
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

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 */
 // As pref-applications.js is always loaded, we can (and should!) reuse
 // the nsI* constants from there, if needed also any services we need.
 var gAppManagerDialog = {
   _removed: [],
   init: function appManager_init() {
     this.handlerInfo = window.arguments[0];
     var bundle = document.getElementById("appManagerBundle");
Comment 1 User image Stefan [:stefanh] 2013-01-04 10:49:41 PST
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.
Comment 2 User image Stefan [:stefanh] 2013-01-04 10:56:01 PST
For more details regarding my issues, see (most of them except no 2 are probably unrelated to this bug)
Comment 3 User image Philip Chee 2013-01-15 06:36:34 PST
Created attachment 702283 [details] [diff] [review]
Patch v1.0 import Services.jsm
Comment 4 User image Philip Chee 2013-01-26 08:24:01 PST
Pushed to comm-central:
Comment 5 User image Philip Chee 2013-01-26 08:28:35 PST
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.
Comment 6 User image Ian Neal 2013-01-26 08:30:50 PST
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
Comment 8 User image Philip Chee 2013-02-02 20:54:07 PST
Pushed to comm-release:

Note You need to log in before you can comment on or make changes to this bug.