Closed Bug 759460 Opened 12 years ago Closed 12 years ago

Preprocess channel name into nsUpdateService.js instead of just using 'default'

Categories

(Toolkit :: Application Update, defect)

15 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14
Tracking Status
firefox14 - fixed
firefox15 - fixed

People

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

References

Details

Attachments

(1 file)

To help mitigate problems with the channel name defined in the channel-prefs.js file I would like to change the channel name 'default' used in nsUpdateService.js to be the channel name defined during the build.

Patch coming up
This will also mitigate issues where the channel-prefs.js file disappears for whatever reason.
btw: this WILL NOT remove the channel-prefs.js file and the channel defined in channel-prefs.js will take precedence over this value.
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #628067 - Flags: review?(netzen)
Comment on attachment 628067 [details] [diff] [review]
patch rev1 - preprocess the channel name into nsUpdateService.js

Review of attachment 628067 [details] [diff] [review]:
-----------------------------------------------------------------

function Update(update) {
  this._properties = {};
  this._patches = [];
  this.isCompleteUpdate = false;
  this.showPrompt = false;
  this.showSurvey = false;
  this.showNeverForVersion = false;
?  this.channel = "default"


Does the line denoted with ? need to be updated to use this pref as well?
Attachment #628067 - Flags: review?(netzen) → review+
Blocks: 657789
No longer blocks: 657789
(In reply to Brian R. Bondy [:bbondy] from comment #4)
> Comment on attachment 628067 [details] [diff] [review]
> patch rev1 - preprocess the channel name into nsUpdateService.js
> 
> Review of attachment 628067 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> function Update(update) {
>   this._properties = {};
>   this._patches = [];
>   this.isCompleteUpdate = false;
>   this.showPrompt = false;
>   this.showSurvey = false;
>   this.showNeverForVersion = false;
> ?  this.channel = "default"
> 
> 
> Does the line denoted with ? need to be updated to use this pref as well?
It gets set from the update itself so it doesn't have to be set here.
http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/update/nsUpdateService.js#2566
sounds good, thanks
https://hg.mozilla.org/mozilla-central/rev/3a8bfbf6d2f6
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Comment on attachment 628067 [details] [diff] [review]
patch rev1 - preprocess the channel name into nsUpdateService.js

[Approval Request Comment]
Bug caused by (feature/regressing bug #): This is a mitigation for Bug 746156 and Bug 756325
User impact if declined: Likely none. This handles the case where if the channel-prefs.js file which contains the channel name disappears the channel name will still be correct.
Testing completed (on m-c, etc.): Visual inspection of files in the build.
Risk to taking this patch (and alternatives if risky): Minimal.
String or UUID changes made by this patch: None
Attachment #628067 - Flags: approval-mozilla-aurora?
To verify this:
1. install a nightly build with the fix that has an update available.
2. delete the channel-prefs.js file from defaults/pref/channel-prefs.js
3. check if defaults/preferences/channel-prefs.js exists and if it does delete it.
4. launch Firefox.
5. verify in about:config that the app.update.channel pref does not exist.
6. verify that you can update to the latest.
Comment on attachment 628067 [details] [diff] [review]
patch rev1 - preprocess the channel name into nsUpdateService.js

[Triage Comment]
Approving for Aurora 14 given this is hardening of code and low risk.
Attachment #628067 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Pushed tp mozilla-aurora
https://hg.mozilla.org/releases/mozilla-aurora/rev/49bd90effd98
Target Milestone: mozilla15 → mozilla14
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: