Commit b86512f4 authored by Mike Perry's avatar Mike Perry
Browse files

Bug 4718: Make versioncheck happen on each new window+New Identity

We were already pinging check in these cases for the update notice. Might as
well actually perform a versioncheck then, too.

Also, Roger didn't like the additional TCP connection and dirfetch overhead at
guards caused by a purely clock-based version check that happened even when
the browser was not in use.
parent 58dc8f14
......@@ -4237,7 +4237,8 @@ function torbutton_new_window(event)
//window.addEventListener("resize", torbutton_do_resize, true);
// Check the version on every new window. We're already pinging check in these cases.
function torbutton_close_window(event) {
......@@ -494,7 +494,6 @@ function CookieJarSelector() {
var jarThis = this;
this.timerCallback = {
cookie_changed: false,
update_counter: 0,
QueryInterface: function(iid) {
if (!iid.equals(Component.interfaces.nsISupports) &&
......@@ -505,27 +504,6 @@ function CookieJarSelector() {
return this;
notify: function() {
// XXX: ========== WARNING! Ultra-mega hack: ===============
// For various reasons, we want to totally refactor Torbutton.
// (see #5709). Since there's no great place to place this timer,
// I figured we might as well place it here.
// Additionally, mobile should verify that nsITimer.TYPE_REPEATING_SLACK
// is smart wrt suspend.
// We want to perform an update check *about* twice per day.
// I thought about randomizing it, but the slack will probably
// introduce enough noise over the course of 12 hours or so...
// Might as well KISS.
if (++this.update_counter > 720) {
jarThis.logger.log(3, "Performing async version check");
this.update_counter = 0;
var wm = Cc[";1"]
var chrome = wm.getMostRecentWindow("navigator:browser");
// this refers to timerCallback object. use jarThis to reference
// CookieJarSelector object.
if(!this.cookie_changed) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment