mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1069567 - [e10s] Make remote browser contentPrincipals not be CPOWs. r=billm.
--HG-- extra : rebase_source : 4f47430a2ff95737e579ddca1655d410656bb64a
This commit is contained in:
parent
65c67ca7fc
commit
11e4975e65
@ -926,7 +926,7 @@ nsContextMenu.prototype = {
|
||||
var frameURL = doc.location.href;
|
||||
|
||||
urlSecurityCheck(frameURL,
|
||||
this._unremotePrincipal(this.browser.contentPrincipal),
|
||||
this.browser.contentPrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
var referrer = doc.referrer;
|
||||
openUILinkIn(frameURL, "current", { disallowInheritPrincipal: true,
|
||||
@ -987,7 +987,7 @@ nsContextMenu.prototype = {
|
||||
viewImageDesc: function(e) {
|
||||
var doc = this.target.ownerDocument;
|
||||
urlSecurityCheck(this.imageDescURL,
|
||||
this._unremotePrincipal(this.browser.contentPrincipal),
|
||||
this.browser.contentPrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
openUILink(this.imageDescURL, e, { disallowInheritPrincipal: true,
|
||||
referrerURI: doc.documentURIObject });
|
||||
@ -999,7 +999,7 @@ nsContextMenu.prototype = {
|
||||
|
||||
reloadImage: function(e) {
|
||||
urlSecurityCheck(this.mediaURL,
|
||||
this._unremotePrincipal(this.browser.contentPrincipal),
|
||||
this.browser.contentPrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
|
||||
if (this.target instanceof Ci.nsIImageLoadingContent)
|
||||
@ -1015,7 +1015,7 @@ nsContextMenu.prototype = {
|
||||
else {
|
||||
viewURL = this.mediaURL;
|
||||
urlSecurityCheck(viewURL,
|
||||
this._unremotePrincipal(this.browser.contentPrincipal),
|
||||
this.browser.contentPrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
}
|
||||
|
||||
@ -1058,7 +1058,7 @@ nsContextMenu.prototype = {
|
||||
// Change current window to the URL of the background image.
|
||||
viewBGImage: function(e) {
|
||||
urlSecurityCheck(this.bgImageURL,
|
||||
this._unremotePrincipal(this.browser.contentPrincipal),
|
||||
this.browser.contentPrincipal,
|
||||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
var doc = this.target.ownerDocument;
|
||||
openUILink(this.bgImageURL, e, { disallowInheritPrincipal: true,
|
||||
|
@ -92,6 +92,7 @@ let WebProgressListener = {
|
||||
json.documentURI = content.document.documentURIObject.spec;
|
||||
json.charset = content.document.characterSet;
|
||||
json.mayEnableCharacterEncodingMenu = docShell.mayEnableCharacterEncodingMenu;
|
||||
json.principal = content.document.nodePrincipal;
|
||||
}
|
||||
|
||||
sendAsyncMessage("Content:LocationChange", json, objects);
|
||||
|
@ -447,7 +447,7 @@
|
||||
readonly="true"/>
|
||||
|
||||
<property name="contentPrincipal"
|
||||
onget="return this.contentDocumentAsCPOW.nodePrincipal;"
|
||||
onget="return this.contentDocument.nodePrincipal;"
|
||||
readonly="true"/>
|
||||
|
||||
<property name="showWindowResizer"
|
||||
|
@ -135,6 +135,12 @@
|
||||
onget="return null"
|
||||
readonly="true"/>
|
||||
|
||||
<field name="_contentPrincipal">null</field>
|
||||
|
||||
<property name="contentPrincipal"
|
||||
onget="return this._contentPrincipal"
|
||||
readonly="true"/>
|
||||
|
||||
<property name="contentDocumentAsCPOW"
|
||||
onget="return this.contentWindowAsCPOW ? this.contentWindowAsCPOW.document : null"
|
||||
readonly="true"/>
|
||||
|
@ -176,6 +176,7 @@ RemoteWebProgressManager.prototype = {
|
||||
this._browser._documentURI = newURI(json.documentURI);
|
||||
this._browser._imageDocument = null;
|
||||
this._browser._mayEnableCharacterEncodingMenu = json.mayEnableCharacterEncodingMenu;
|
||||
this._browser._contentPrincipal = json.principal;
|
||||
}
|
||||
|
||||
this._callProgressListeners("onLocationChange", webProgress, request, location, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user