зеркало из https://github.com/mozilla/pjs.git
Bug 329468: check url before showing frame, patch by Martijn Wargers <martijn.martijn@gmail.com>, r=dveditz
This commit is contained in:
Родитель
e0d5540578
Коммит
ac3f75ff42
|
@ -4559,7 +4559,14 @@ nsContextMenu.prototype = {
|
|||
},
|
||||
// Open clicked-in frame in the same window.
|
||||
showOnlyThisFrame : function () {
|
||||
window.loadURI(this.target.ownerDocument.location.href, null, null, false);
|
||||
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 ) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче