Closed
Bug 1135934
Opened 10 years ago
Closed 10 years ago
[e10s] "View Background Image" and "View Description" in remote browser cause unsafe CPOW usage warning
Categories
(Firefox :: Menus, defect)
Firefox
Menus
Tracking
()
RESOLVED
FIXED
Firefox 39
People
(Reporter: Kwan, Assigned: Kwan)
References
Details
Attachments
(1 file)
+++ This bug was initially created as a clone of Bug #1133577 +++
STR:
1) Visit a site with a background image on it in an e10s window
2) Right-click on the page, and choose "View Background Image"
This causes some "unsafe CPOW usage" warnings in the Browser Console.
In browser/base/content/nsContextMenu.js:
// Change current window to the URL of the background image.
viewBGImage: function(e) {
urlSecurityCheck(this.bgImageURL,
this.browser.contentPrincipal,
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
var doc = this.target.ownerDocument; <-- Causes CPOW warning
openUILink(this.bgImageURL, e, { disallowInheritPrincipal: true,
referrerURI: doc.documentURIObject }); <-- Causes CPOW warning
},
in toolkit/modules/RemoteWebNavigation.jsm
loadURI: function(aURI, aLoadFlags, aReferrer, aPostData, aHeaders) {
if (aPostData || aHeaders)
throw Components.Exception("RemoteWebNavigation doesn't accept postdata or headers.", Cr.NS_ERROR_INVALID_ARGS);
this._browser._contentTitle = "";
this._sendMessage("WebNavigation:LoadURI", {
uri: aURI,
flags: aLoadFlags,
referrer: aReferrer ? aReferrer.spec : null <-- Causes CPOW warning
});
},
Updated•10 years ago
|
| Assignee | ||
Comment 1•10 years ago
|
||
Morphing to include "View Description" (on images) since they are both only making the one mistake of accessing this.target.ownerDocument.documentURIObject, and so are both now simple fixes.
Assignee: nobody → moz-ian
Status: NEW → ASSIGNED
Summary: [e10s] "View Background Image" in remote browser causes unsafe CPOW usage warning → [e10s] "View Background Image" and "View Description" in remote browser cause unsafe CPOW usage warning
| Assignee | ||
Comment 2•10 years ago
|
||
Attachment #8574415 -
Flags: review?(mconley)
Comment 3•10 years ago
|
||
Comment on attachment 8574415 [details] [diff] [review]
Make "View Background Image" and "View Description" use gContextMenuContentData to avoid unsafe CPOW warnings
Review of attachment 8574415 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great!
Attachment #8574415 -
Flags: review?(mconley) → review+
| Assignee | ||
Comment 4•10 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=1d9150de2dc0
Linux and Windows green, OSX tests, so, so busted, but that's nothing to do with me.
Keywords: checkin-needed
Comment 5•10 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Comment 6•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
You need to log in
before you can comment on or make changes to this bug.
Description
•