[open-ils-commits] r11968 - branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/util

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Jan 26 00:38:46 EST 2009


Author: phasefx
Date: 2009-01-26 00:38:44 -0500 (Mon, 26 Jan 2009)
New Revision: 11968

Modified:
   branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/util/deck.js
Log:
js2JSON is dangerous when you start referencing non-pure javascript data (i.e. { 'w' : window, 'd' : document }) that can be self-referential, etc

Modified: branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/util/deck.js
===================================================================
--- branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/util/deck.js	2009-01-26 04:27:12 UTC (rev 11967)
+++ branches/staff-client-experiment/Open-ILS/xul/staff_client/chrome/content/util/deck.js	2009-01-26 05:38:44 UTC (rev 11968)
@@ -55,7 +55,7 @@
 			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 @@
 		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');



More information about the open-ils-commits mailing list