From 7344473e453bf7d4474f1ed72e729efdca63605a Mon Sep 17 00:00:00 2001 From: Simon Kornblith Date: Mon, 9 Jan 2012 23:15:10 -0500 Subject: [PATCH] Call complete method to activate garbage collection, if one exists --- chrome/content/zotero/xpcom/integration.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/integration.js b/chrome/content/zotero/xpcom/integration.js index fa8e6c5a82..ff546191e7 100644 --- a/chrome/content/zotero/xpcom/integration.js +++ b/chrome/content/zotero/xpcom/integration.js @@ -387,6 +387,12 @@ Zotero.Integration = new function() { if(doc) { try { doc.cleanup(); + + // Call complete function if one exists + if(doc.wrappedJSObject && doc.wrappedJSObject.complete) { + doc.wrapped.JSObject.complete(); + } + doc.activate(); } catch(e) { Zotero.logError(e);