diff options
-rw-r--r-- | application/palemoon/installer/package-manifest.in | 2 | ||||
-rw-r--r-- | parser/html/nsHtml5TreeOpExecutor.cpp | 7 | ||||
-rw-r--r-- | python/mozbuild/mozbuild/mach_commands.py | 10 |
3 files changed, 17 insertions, 2 deletions
diff --git a/application/palemoon/installer/package-manifest.in b/application/palemoon/installer/package-manifest.in index fb5441832..26b4969d6 100644 --- a/application/palemoon/installer/package-manifest.in +++ b/application/palemoon/installer/package-manifest.in @@ -56,7 +56,7 @@ @RESPATH@/hyphenation/* @RESPATH@/browser/@PREF_DIR@/palemoon-l10n.js @RESPATH@/browser/searchplugins/* -#ifdef HAVE_MAKENSISU +#ifdef XP_WIN32 @BINPATH@/uninstall/helper.exe #endif #ifdef MOZ_UPDATER diff --git a/parser/html/nsHtml5TreeOpExecutor.cpp b/parser/html/nsHtml5TreeOpExecutor.cpp index b0eabb13d..468449698 100644 --- a/parser/html/nsHtml5TreeOpExecutor.cpp +++ b/parser/html/nsHtml5TreeOpExecutor.cpp @@ -1041,12 +1041,17 @@ nsHtml5TreeOpExecutor::AddSpeculationCSP(const nsAString& aCSP) NS_ASSERTION(NS_IsMainThread(), "Wrong thread!"); - nsIPrincipal* principal = mDocument->NodePrincipal(); + nsCOMPtr<nsIPrincipal> principal = mDocument->NodePrincipal(); nsCOMPtr<nsIContentSecurityPolicy> preloadCsp; nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(mDocument); nsresult rv = principal->EnsurePreloadCSP(domDoc, getter_AddRefs(preloadCsp)); NS_ENSURE_SUCCESS_VOID(rv); + if (!preloadCsp) { + // XXX: System principals can't preload CSP. We're done here. + return; + } + // please note that meta CSPs and CSPs delivered through a header need // to be joined together. rv = preloadCsp->AppendPolicy(aCSP, diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index f654db769..1bd5b8d34 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -541,6 +541,16 @@ class Build(MachCommandBase): # as when doing OSX Universal builds) pass + # Check if there are any unpreprocessed files in '@MOZ_OBJDIR@/dist/bin' + # See python/mozbuild/mozbuild/preprocessor.py#L293-L309 for the list of directives + # We skip if, ifdef, ifndef, else, elif, elifdef and elifndef, because they are never used alone + grepcmd = 'grep -E -r "^(#|%)(define|endif|error|expand|filter|include|literal|undef|unfilter)" '\ + + '--include=\*.{css,dtd,html,js,jsm,xhtml,xml,xul,manifest,properties,rdf} '\ + + self.topobjdir + '/dist/bin | grep -v ".css:#"' + grepresult = subprocess.Popen(grepcmd, stdout=subprocess.PIPE, shell=True).communicate()[0] + if grepresult: + print('\nERROR: preprocessor was not applied to the following files:\n\n' + grepresult) + return status @Command('configure', category='build', |