From 33deefbf74dd96c082d0950c2f927a8befbe88fc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 17 Jan 2017 02:58:47 -0500 Subject: [PATCH] Limit depth to 1 when outputting data objects This prevents descending into the global object cache that's accessible from every data object. --- chrome/content/zotero/xpcom/utilities.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/utilities.js b/chrome/content/zotero/xpcom/utilities.js index 85d1d027e..3851c13fd 100644 --- a/chrome/content/zotero/xpcom/utilities.js +++ b/chrome/content/zotero/xpcom/utilities.js @@ -1386,6 +1386,11 @@ Zotero.Utilities = { return '<> ' + obj; } + // Don't descend into global object cache for data objects + if (Zotero.isClient && typeof obj == 'object' && obj instanceof Zotero.DataObject) { + maxLevel = 1; + } + // More complex dump with indentation for objects if (level === undefined) { level = 0;