commit 0f7d1c706171ffbcfd2e5c75592b129434972e3c
parent cdedbaccacba4b33b1fbbfc83b37ee12622c9e2f
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 4 Apr 2016 06:33:15 -0400
Fix various connector-mode issues for 5.0
Still more to fix
Diffstat:
4 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/chrome/content/zotero/browser.js b/chrome/content/zotero/browser.js
@@ -294,7 +294,7 @@ var Zotero_Browser = new function() {
* object, and updates the status of the capture icon
*/
var contentLoad = Zotero.Promise.coroutine(function* (event) {
- if (Zotero.Schema.schemaUpdatePromise.isPending()) {
+ if (Zotero.Schema && Zotero.Schema.schemaUpdatePromise.isPending()) {
yield Zotero.Schema.schemaUpdatePromise;
}
@@ -448,7 +448,7 @@ var Zotero_Browser = new function() {
* thereof of the current page
*/
this.updateStatus = Zotero.Promise.coroutine(function* () {
- if (Zotero.Schema.schemaUpdatePromise.isPending()) {
+ if (Zotero.Schema && Zotero.Schema.schemaUpdatePromise.isPending()) {
yield Zotero.Schema.schemaUpdatePromise;
}
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -789,7 +789,9 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
Zotero.getString('startupError.checkPermissions')
]);
Zotero.startupError = msg;
- } else if(e.name == "NS_ERROR_STORAGE_BUSY" || e.result == 2153971713) {
+ }
+ // Storage busy
+ else if (e.message.endsWith('2153971713')) {
if(Zotero.isStandalone) {
// Standalone should force Fx to release lock
if(!haveReleasedLock && Zotero.IPC.broadcast("releaseLock")) {
diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js
@@ -372,7 +372,7 @@ var ZoteroPane = new function()
}
_madeVisible = true;
- yield this.unserializePersist();
+ this.unserializePersist();
this.updateToolbarPosition();
this.updateTagSelectorSize();
@@ -4508,7 +4508,7 @@ var ZoteroPane = new function()
/**
* Unserializes zotero-persist elements from preferences
*/
- this.unserializePersist = Zotero.Promise.coroutine(function* () {
+ this.unserializePersist = function () {
_unserialized = true;
var serializedValues = Zotero.Prefs.get("pane.persist");
if(!serializedValues) return;
@@ -4533,10 +4533,10 @@ var ZoteroPane = new function()
if(this.itemsView) {
// may not yet be initialized
try {
- yield this.itemsView.sort();
+ this.itemsView.sort();
} catch(e) {};
}
- });
+ };
/**
* Serializes zotero-persist elements to preferences
diff --git a/components/zotero-service.js b/components/zotero-service.js
@@ -286,6 +286,8 @@ function makeZoteroContext(isConnector) {
subscriptLoader.loadSubScript("chrome://zotero/content/xpcom/" + xpcomFile + ".js", zContext);
}
catch (e) {
+ dump("Error loading " + xpcomFile + ".js\n\n");
+ dump(e + "\n\n");
Components.utils.reportError("Error loading " + xpcomFile + ".js", zContext);
throw (e);
}