From: phasefx Date: Mon, 26 Jan 2009 05:38:44 +0000 (+0000) Subject: js2JSON is dangerous when you start referencing non-pure javascript data (i.e. {... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=59672456cd16d4549c9791178c31927cc8b9e70c;p=Evergreen.git js2JSON is dangerous when you start referencing non-pure javascript data (i.e. { 'w' : window, 'd' : document }) that can be self-referential, etc git-svn-id: svn://svn.open-ils.org/ILS/branches/staff-client-experiment@11968 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/chrome/content/util/deck.js b/Open-ILS/xul/staff_client/chrome/content/util/deck.js index 29b5b4c3e7..ad2274d718 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/deck.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/deck.js @@ -55,7 +55,7 @@ util.deck.prototype = { if (content_params) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - this.error.sdump('D_DECK', 'set_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + js2JSON(content_params) ); + this.error.sdump('D_DECK', 'set_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + (content_params) ); var cw = iframe.contentWindow; if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject; cw.IAMXUL = true; cw.xulG = content_params; @@ -91,11 +91,11 @@ util.deck.prototype = { if (content_params) { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - this.error.sdump('D_DECK', 'new_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + js2JSON(content_params) ); + this.error.sdump('D_DECK', 'new_iframe\nurl = ' + url + '\nframe.contentWindow = ' + iframe.contentWindow + '\n' + 'content_params = ' + (content_params) ); var cw = iframe.contentWindow; if (typeof iframe.contentWindow.wrappedJSObject != 'undefined') cw = iframe.contentWindow.wrappedJSObject; cw.IAMXUL = true; cw.xulG = content_params; - this.error.sdump('D_DECK', 'cw = ' + cw + ' cw.xulG = ' + js2JSON(cw.xulG) ); + this.error.sdump('D_DECK', 'cw = ' + cw + ' cw.xulG = ' + (cw.xulG) ); setTimeout( function() { if (typeof cw.default_focus == 'function') cw.default_focus(); }, 0 ); } catch(E) { this.error.sdump('D_ERROR','E: ' + E + '\n');