summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 18:40:11 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-17 18:40:11 +0000
commit2c05562d4c61d066139b0812c85ecbdca9f5b563 (patch)
tree7f79a8f7238041b99382a8a6d90c7f17e7b11363
parent43a3c2a6924db457ab47aa472c28538b04d184cf (diff)
downloadchromium_src-2c05562d4c61d066139b0812c85ecbdca9f5b563.zip
chromium_src-2c05562d4c61d066139b0812c85ecbdca9f5b563.tar.gz
chromium_src-2c05562d4c61d066139b0812c85ecbdca9f5b563.tar.bz2
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
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/background.html3
-rw-r--r--chrome/common/extensions/docs/examples/extensions/gmail/manifest.json2
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/"