mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1279285 - Set the SANDBOXED_AUXILARY_NAVIGATION flag when rendering thumbnails in the background, r=bz
MozReview-Commit-ID: 4grdy6evhrb
This commit is contained in:
parent
fe73634c76
commit
29df86a9be
@ -14,6 +14,14 @@ const STATE_LOADING = 1;
|
||||
const STATE_CAPTURING = 2;
|
||||
const STATE_CANCELED = 3;
|
||||
|
||||
// NOTE: Copied from nsSandboxFlags.h
|
||||
/**
|
||||
* This flag prevents content from creating new auxiliary browsing contexts,
|
||||
* e.g. using the target attribute, the window.open() method, or the
|
||||
* showModalDialog() method.
|
||||
*/
|
||||
const SANDBOXED_AUXILIARY_NAVIGATION = 0x2;
|
||||
|
||||
const backgroundPageThumbsContent = {
|
||||
|
||||
init: function () {
|
||||
@ -33,6 +41,7 @@ const backgroundPageThumbsContent = {
|
||||
Ci.nsIRequest.INHIBIT_CACHING |
|
||||
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY;
|
||||
docShell.defaultLoadFlags = defaultFlags;
|
||||
docShell.sandboxFlags |= SANDBOXED_AUXILIARY_NAVIGATION;
|
||||
|
||||
addMessageListener("BackgroundPageThumbs:capture",
|
||||
this._onCapture.bind(this));
|
||||
|
Loading…
Reference in New Issue
Block a user