From ef7a3f01210e6e1013d1ab1cf3bc93427534e10a Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 29 Oct 2012 17:15:54 -0400 Subject: [PATCH 1/4] Update locales submodule --- chrome/content/zotero/locale/csl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/locale/csl b/chrome/content/zotero/locale/csl index 36d26a584a..92270bbba9 160000 --- a/chrome/content/zotero/locale/csl +++ b/chrome/content/zotero/locale/csl @@ -1 +1 @@ -Subproject commit 36d26a584ac869f2dfbdd528f57141a3bbcf016f +Subproject commit 92270bbba9fb59a57042003a7637afc8e694a94f From 78dd74f391b44d236fe3313a6f08da8c04351099 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 29 Oct 2012 17:32:31 -0400 Subject: [PATCH 2/4] Remove corruption check, since it's no longer necessary and likely to be wrong --- chrome/content/zotero/standalone/standalone.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/chrome/content/zotero/standalone/standalone.js b/chrome/content/zotero/standalone/standalone.js index fa09774878..0d6e66698e 100644 --- a/chrome/content/zotero/standalone/standalone.js +++ b/chrome/content/zotero/standalone/standalone.js @@ -41,18 +41,6 @@ const ZoteroStandalone = new function() { ZoteroPane.init(); ZoteroPane.makeVisible(); - // Run check for corrupt installation, where the wrong Gecko runtime is being used - if(Zotero.isMac && Zotero.isStandalone) { - var greDir = Components.classes["@mozilla.org/file/directory_service;1"] - .getService(Components.interfaces.nsIProperties) - .get("GreD", Components.interfaces.nsIFile); - if(greDir.isSymlink() || greDir.leafName !== "Current") { - var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] - .getService(Components.interfaces.nsIPromptService); - ps.alert(null, "", Zotero.getString('standalone.corruptInstallation')); - } - } - // Don't ask before handing http and https URIs var eps = Components.classes['@mozilla.org/uriloader/external-protocol-service;1'] .getService(Components.interfaces.nsIExternalProtocolService); From 7d2c4e6b2d4951acd292bb25d8275057346ede7f Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 29 Oct 2012 18:01:23 -0400 Subject: [PATCH 3/4] Fix DOMParser for Fx 17, and set minVersion to Fx 15 --- .../xpcom/translation/translate_firefox.js | 25 ++++++------------- install.rdf | 4 +-- update.rdf | 4 +-- 3 files changed, 12 insertions(+), 21 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_firefox.js b/chrome/content/zotero/xpcom/translation/translate_firefox.js index b68c1d882b..c9cc2acfef 100644 --- a/chrome/content/zotero/xpcom/translation/translate_firefox.js +++ b/chrome/content/zotero/xpcom/translation/translate_firefox.js @@ -45,22 +45,17 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) { // import functions missing from global scope into Fx sandbox this.sandbox.XPathResult = Components.interfaces.nsIDOMXPathResult; this.sandbox.DOMParser = function() { + var uri, principal; // get URI - // DEBUG: In Fx 4 we can just use document.nodePrincipal, but in Fx 3.6 this doesn't work if(typeof sandboxLocation === "string") { // if sandbox specified by URI - var uri = sandboxLocation; + var secMan = Services.scriptSecurityManager; + uri = Services.io.newURI(sandboxLocation, "UTF-8", null); + principal = (secMan.getCodebasePrincipal || secMan.getSimpleCodebasePrincipal)(uri); } else { // if sandbox specified by DOM document - var uri = sandboxLocation.location.toString(); + principal = sandboxLocation.document.nodePrincipal; + uri = sandboxLocation.document.documentURIObject; } - // get principal from URI - var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"] - .getService(Components.interfaces.nsIScriptSecurityManager); - var ioService = Components.classes["@mozilla.org/network/io-service;1"] - .getService(Components.interfaces.nsIIOService); - uri = ioService.newURI(uri, "UTF-8", null); - var principal = secMan.getCodebasePrincipal(uri); - // initialize DOM parser var _DOMParser = Components.classes["@mozilla.org/xmlextras/domparser;1"] .createInstance(Components.interfaces.nsIDOMParser); @@ -68,12 +63,8 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) { // expose parseFromString this.__exposedProps__ = {"parseFromString":"r"}; - if(Zotero.isFx5) { - this.parseFromString = function(str, contentType) { - return Zotero.Translate.SandboxManager.Fx5DOMWrapper(_DOMParser.parseFromString(str, contentType)); - } - } else { - this.parseFromString = function(str, contentType) _DOMParser.parseFromString(str, contentType); + this.parseFromString = function(str, contentType) { + return Zotero.Translate.SandboxManager.Fx5DOMWrapper(_DOMParser.parseFromString(str, contentType)); } }; this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"}; diff --git a/install.rdf b/install.rdf index bfb30488fb..71bdaf0a72 100644 --- a/install.rdf +++ b/install.rdf @@ -25,8 +25,8 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - 3.6 - 15.0a1 + 5.0 + 19.0a1 diff --git a/update.rdf b/update.rdf index dc394f8da2..b7f16c2497 100644 --- a/update.rdf +++ b/update.rdf @@ -11,8 +11,8 @@ {ec8030f7-c20a-464f-9b0e-13a3a9e97384} - 3.6 - 15.0a1 + 5.0 + 19.0a1 http://download.zotero.org/extension/zotero.xpi sha1: From 52f4bd8f6753e5f42269cc936b48d49243a6b4d7 Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 29 Oct 2012 18:02:04 -0400 Subject: [PATCH 4/4] Fix processDocuments for Fx 17 --- chrome/content/zotero/xpcom/http.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js index f19e698ab4..43e8fe816d 100644 --- a/chrome/content/zotero/xpcom/http.js +++ b/chrome/content/zotero/xpcom/http.js @@ -533,8 +533,9 @@ Zotero.HTTP = new function() { * @inner */ var onLoad = function() { - var doc = hiddenBrowser.contentDocument, - url = doc.location.href.toString(); + var doc = hiddenBrowser.contentDocument; + if(!doc) return; + var url = doc.location.href.toString(); if(url == "about:blank") return; if(doc.readyState === "loading" && firedLoadEvent < 120) { // Try again in a second