Bug 1014007: reset _pendingRequest property on the correct scope. r=felipe
authorMike de Boer <mdeboer@mozilla.com>
Mon, 02 Jun 2014 16:40:27 +0200
changeset 205545 dcc77a773d883b07e920d414d2ac043257faa02e
parent 205544 57a76b26c953e120551601ea269d780f05548ad5
child 205546 7a1a3c3942bd92a27bf4dd5f10f8d35993570f5d
push id3741
push userasasaki@mozilla.com
push dateMon, 21 Jul 2014 20:25:18 +0000
treeherdermozilla-beta@4d6f46f5af68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1014007
milestone32.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1014007: reset _pendingRequest property on the correct scope. r=felipe
browser/components/translation/BingTranslator.jsm
--- a/browser/components/translation/BingTranslator.jsm
+++ b/browser/components/translation/BingTranslator.jsm
@@ -329,17 +329,17 @@ let BingTokenManager = {
       "scope=" + encodeURIComponent("http://api.microsofttranslator.com"),
       "client_id=",
       "client_secret="
     ];
 
     let deferred = Promise.defer();
     this._pendingRequest = deferred.promise;
     request.post(params.join("&"), function(err) {
-      this._pendingRequest = null;
+      BingTokenManager._pendingRequest = null;
 
       if (err) {
         deferred.reject(err);
       }
 
       try {
         let json = JSON.parse(this.response.body);
         let token = json.access_token;