From 2c05562d4c61d066139b0812c85ecbdca9f5b563 Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Thu, 17 Dec 2009 18:40:11 +0000 Subject: Fix a bug in the gmail checker that caused it to schedule 2 requests for each one that timed out. My theory is that this is causing the memory leak with this extension. BUG=29919 Review URL: http://codereview.chromium.org/502046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34849 0039d316-1c4b-4281-b951-d872f2087c98 --- .../common/extensions/docs/examples/extensions/gmail/background.html | 3 +-- chrome/common/extensions/docs/examples/extensions/gmail/manifest.json | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/background.html b/chrome/common/extensions/docs/examples/extensions/gmail/background.html index 9b188e3..f0c9b6a 100644 --- a/chrome/common/extensions/docs/examples/extensions/gmail/background.html +++ b/chrome/common/extensions/docs/examples/extensions/gmail/background.html @@ -116,8 +116,7 @@ function startRequest() { function getInboxCount(onSuccess, onError) { var xhr = new XMLHttpRequest(); var abortTimerId = window.setTimeout(function() { - xhr.abort(); - onError(); + xhr.abort(); // synchronously calls onreadystatechange }, requestTimeout); function handleSuccess(count) { diff --git a/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json b/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json index 5c8eedd..002b9a8 100644 --- a/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json +++ b/chrome/common/extensions/docs/examples/extensions/gmail/manifest.json @@ -1,7 +1,7 @@ { "name": "Google Mail Checker", "description": "Displays the number of unread messages in your Google Mail inbox. You can also click the button to open your inbox.", - "version": "1.2", + "version": "1.3", "background_page": "background.html", "permissions": [ "tabs", "http://*.google.com/", "https://*.google.com/" -- cgit v1.1