rem:  var focusedWindow = document.commandDispatcher.focusedWindow; var sourceWin = isDocumentFrame(focusedWindow) ? focusedWindow.location.href : window._content.location.href;  const nsIScriptSecurityManager = Components.interfaces.nsIScriptSecurityManager; var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService(). QueryInterface(nsIScriptSecurityManager); try { secMan.checkLoadURIStr(sourceWin, url, nsIScriptSecurityManager.STANDARD); } catch (e) { throw "Load of " + url + " denied."; } 
add: urlSecurityCheck(url, document); 
context:   function openNewWindowWith(url) {    // URL Loading Security Check	var focusedWindow = document.commandDispatcher.focusedWindow;    var sourceWin = isDocumentFrame(focusedWindow) ? focusedWindow.location.href : window._content.location.href;    const nsIScriptSecurityManager = Components.interfaces.nsIScriptSecurityManager;    var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService().                 QueryInterface(nsIScriptSecurityManager);	try {      secMan.checkLoadURIStr(sourceWin, url, nsIScriptSecurityManager.STANDARD);    } catch (e) {	  throw "Load of " + url + " denied.";    }    var newWin;    var wintype = document.firstChild.getAttribute('windowtype');         // if and only if the current window is a browser window and it has a document with a character    // set, then extract the current charset menu setting from the current document and use it to    // initialize the new browser window...    if (window && (wintype == "navigator:browser") &&      window._content && window._content.document) {      var DocCharset = window._content.document.characterSet;      var charsetArg = "charset="+DocCharset;       //we should "inherit" the charset menu setting in a new window      newWin = window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url, charsetArg, true );    }    else { // forget about the charset information.      newWin = window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url, null, true );    }     // Fix new window.        newWin.saveFileAndPos = true;  }
meta: 5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5459/86e43fa547cd7a64ccd80def16fcb0ea1554fb74/contentAreaUtils.js/buggy/suite/common/contentAreaUtils.js