Don't leak memory when showing the select dialog
Again, I'm pretty sure this shouldn't be necessary.
This commit is contained in:
parent
51bcd2409d
commit
954e60a83a
1 changed files with 5 additions and 1 deletions
|
@ -450,7 +450,7 @@ Zotero.Translate.Sandbox = {
|
|||
*/
|
||||
"selectItems":function(translate, items, callback) {
|
||||
function transferObject(obj) {
|
||||
return Zotero.isFx ? translate._sandboxManager.copyObject(obj) : obj;
|
||||
return Zotero.isFx && !Zotero.isBookmarklet ? translate._sandboxManager.copyObject(obj) : obj;
|
||||
}
|
||||
|
||||
if(Zotero.Utilities.isEmpty(items)) {
|
||||
|
@ -499,6 +499,10 @@ Zotero.Translate.Sandbox = {
|
|||
};
|
||||
}
|
||||
|
||||
if(Zotero.isFx && !Zotero.isBookmarklet) {
|
||||
items = Components.utils.cloneInto(items, {});
|
||||
}
|
||||
|
||||
var returnValue = translate._runHandler("select", items, newCallback);
|
||||
if(returnValue !== undefined) {
|
||||
// handler may have returned a value, which makes callback unnecessary
|
||||
|
|
Loading…
Reference in a new issue