From 03bea7fc78f6a5fd6f6f3c2d4807d6cfc0c09aa6 Mon Sep 17 00:00:00 2001 From: Luca Greco Date: Thu, 21 Oct 2021 11:51:05 +0000 Subject: [PATCH] Bug 1736825 - Improve manifest.json files parsing in browser_all_files_referenced.js. r=florian Differential Revision: https://phabricator.services.mozilla.com/D129019 --- .../test/static/browser_all_files_referenced.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/browser/base/content/test/static/browser_all_files_referenced.js b/browser/base/content/test/static/browser_all_files_referenced.js index c2def1948e1e..ef768d81b6f5 100644 --- a/browser/base/content/test/static/browser_all_files_referenced.js +++ b/browser/base/content/test/static/browser_all_files_referenced.js @@ -467,6 +467,12 @@ async function parseJsonManifest(uri) { return uri; } + if (data.background?.scripts) { + for (let bgscript of data.background.scripts) { + gReferencesFromCode.set(uri.resolve(bgscript), null); + } + } + if (data.icons) { for (let icon of Object.values(data.icons)) { gReferencesFromCode.set(uri.resolve(icon), null); @@ -479,6 +485,10 @@ async function parseJsonManifest(uri) { let script = uri.resolve(api.parent.script); gReferencesFromCode.set(script, null); } + + if (api.schema) { + gReferencesFromCode.set(uri.resolve(api.schema), null); + } } }