The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in Firefox 14

Status

()

Toolkit
Application Update
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: rstrong, Assigned: rstrong)

Tracking

15 Branch
mozilla14
Points:
---

Firefox Tracking Flags

(firefox14- fixed, firefox15- fixed)

Details

Attachments

(1 attachment)

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.
Created attachment 628067 [details] [diff] [review]
patch rev1 - preprocess the channel name into nsUpdateService.js
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
Pushed to mozilla-inbound
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a8bfbf6d2f6
https://hg.mozilla.org/mozilla-central/rev/3a8bfbf6d2f6
Status: ASSIGNED → RESOLVED
Last Resolved: 5 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?
status-firefox14: --- → affected
status-firefox15: --- → fixed
tracking-firefox14: --- → ?
tracking-firefox15: --- → ?
Blocks: 657789
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+

Updated

5 years ago
tracking-firefox14: ? → -
tracking-firefox15: ? → -
Pushed tp mozilla-aurora
https://hg.mozilla.org/releases/mozilla-aurora/rev/49bd90effd98
status-firefox14: affected → fixed
Target Milestone: mozilla15 → mozilla14
You need to log in before you can comment on or make changes to this bug.