diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index fec534de72..2ae32769f9 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -249,7 +249,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, onDone, responseCharset); }; @@ -337,7 +338,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, onDone, responseCharset); }; @@ -401,7 +403,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, onDone); }; @@ -440,7 +443,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, callback); }; xmlhttp.send(null); @@ -482,7 +486,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, function (xmlhttp) { Zotero.debug("Proxy auth request completed with status " + xmlhttp.status + ": " + xmlhttp.responseText); @@ -561,7 +566,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, callback); }; @@ -597,7 +603,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, callback); }; xmlhttp.send(null); @@ -642,7 +649,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, callback); }; xmlhttp.send(body); @@ -681,7 +689,8 @@ Zotero.HTTP = new function() { var useMethodjit = Components.utils.methodjit; /** @ignore */ xmlhttp.onreadystatechange = function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; _stateChange(xmlhttp, callback); }; xmlhttp.send(null); diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 70c786e179..4497229dd1 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -1545,7 +1545,8 @@ Components.utils.import("resource://gre/modules/Services.jsm"); yielded, useJIT = Components.utils.methodjit; var timerCallback = {"notify":function() { - Components.utils.methodjit = useJIT; + // XXX Remove when we drop support for Fx <24 + if(useJIT !== undefined) Components.utils.methodjit = useJIT; var err = false; _waiting--; @@ -1610,7 +1611,8 @@ Components.utils.import("resource://gre/modules/Services.jsm"); createInstance(Components.interfaces.nsITimer), useJIT = Components.utils.methodjit; var timerCallback = {"notify":function() { - Components.utils.methodjit = useJIT; + // XXX Remove when we drop support for Fx <24 + if(useJIT !== undefined) Components.utils.methodjit = useJIT; if(_waiting && !runWhenWaiting) { // if our callback gets called during Zotero.wait(), queue it to be set again diff --git a/resource/q.js b/resource/q.js index 029b5beddc..f73a913369 100644 --- a/resource/q.js +++ b/resource/q.js @@ -70,7 +70,8 @@ timer = Components.classes["@mozilla.org/timer;1"]. createInstance(Components.interfaces.nsITimer); timer.initWithCallback({"notify":function() { - Components.utils.methodjit = useMethodjit; + // XXX Remove when we drop support for Fx <24 + if(useMethodjit !== undefined) Components.utils.methodjit = useMethodjit; // Remove timer from array so it can be garbage collected _runningTimers.splice(_runningTimers.indexOf(timer), 1);