Bug 329468: check url before showing frame, patch by Martijn Wargers <martijn.martijn@gmail.com>, r=dveditz

This commit is contained in:
gavin%gavinsharp.com 2006-05-03 00:43:11 +00:00
Родитель 3092fa9e6f
Коммит 343007b3e3
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -4559,7 +4559,14 @@ nsContextMenu.prototype = {
},
// Open clicked-in frame in the same window.
showOnlyThisFrame : function () {
try {
const secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"]
.getService(Components.interfaces.nsIScriptSecurityManager);
const nsIScriptSecMan = Components.interfaces.nsIScriptSecurityManager;
secMan.checkLoadURI(gBrowser.currentURI, makeURI(this.target.ownerDocument.location.href),
nsIScriptSecMan.DISALLOW_SCRIPT);
window.loadURI(this.target.ownerDocument.location.href, null, null, false);
} catch(e) {}
},
// View Partial Source
viewPartialSource : function ( context ) {