From 0fb869ec4cf60d059fd56ed27ba5ea32d4e023a2 Mon Sep 17 00:00:00 2001 From: Christoph Kerschbaumer Date: Tue, 4 Jun 2019 04:57:57 +0000 Subject: [PATCH] Bug 1496386: Apply Meta CSP to System Privileged about:memory. Differential Revision: https://phabricator.services.mozilla.com/D33594 --HG-- extra : moz-landing-system : lando --- modules/libpref/init/all.js | 2 +- toolkit/components/aboutmemory/content/aboutMemory.js | 8 ++++---- toolkit/components/aboutmemory/content/aboutMemory.xhtml | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index b5890c629385..9e0825b07a04 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -2638,7 +2638,7 @@ pref("security.dialog_enable_delay", 1000); pref("security.notification_enable_delay", 500); #if defined(DEBUG) && !defined(ANDROID) -pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,memory,networking,newtab,performance,plugins,policies,profiles,restartrequired,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback"); +pref("csp.about_uris_without_csp", "blank,printpreview,srcdoc,addons,cache-entry,config,crashes,debugging,devtools,downloads,home,networking,newtab,performance,plugins,policies,profiles,restartrequired,serviceworkers,sessionrestore,support,sync-log,telemetry,url-classifier,webrtc,welcomeback"); // the following prefs are for testing purposes only. pref("csp.overrule_about_uris_without_csp_whitelist", false); pref("csp.skip_about_page_has_csp_assert", false); diff --git a/toolkit/components/aboutmemory/content/aboutMemory.js b/toolkit/components/aboutmemory/content/aboutMemory.js index c917ca80d01a..b1e20d8be03f 100644 --- a/toolkit/components/aboutmemory/content/aboutMemory.js +++ b/toolkit/components/aboutmemory/content/aboutMemory.js @@ -129,8 +129,8 @@ function stringMatchesFilter(aString, aFilter) { // --------------------------------------------------------------------------- -function onUnload() { -} +window.onunload = function() { +}; // --------------------------------------------------------------------------- @@ -272,7 +272,7 @@ function appendHiddenFileInput(aP, aId, aChangeListener) { return input; } -function onLoad() { +window.onload = function() { // Generate the header. let header = appendElement(document.body, "div", "ancillary"); @@ -430,7 +430,7 @@ function onLoad() { } } } -} +}; // --------------------------------------------------------------------------- diff --git a/toolkit/components/aboutmemory/content/aboutMemory.xhtml b/toolkit/components/aboutmemory/content/aboutMemory.xhtml index 9d8626d595c3..fb85a7baf17f 100644 --- a/toolkit/components/aboutmemory/content/aboutMemory.xhtml +++ b/toolkit/components/aboutmemory/content/aboutMemory.xhtml @@ -6,11 +6,12 @@ + Memory Analyzer