aboutsummaryrefslogtreecommitdiff
path: root/background/page_actions_server.js
diff options
context:
space:
mode:
Diffstat (limited to 'background/page_actions_server.js')
-rw-r--r--background/page_actions_server.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/background/page_actions_server.js b/background/page_actions_server.js
index fbb672e..2a0b858 100644
--- a/background/page_actions_server.js
+++ b/background/page_actions_server.js
@@ -29,31 +29,31 @@
return;
let components = settings.components;
- let processed_bundles = new Set();
+ let processed_bags = new Set();
- send_scripts_rec(components, port, processed_bundles);
+ send_scripts_rec(components, port, processed_bags);
}
// TODO: parallelize script fetching
- async function send_scripts_rec(components, port, processed_bundles)
+ async function send_scripts_rec(components, port, processed_bags)
{
for (let [prefix, name] of components) {
- if (prefix === TYPE_PREFIX.BUNDLE) {
- if (processed_bundles.has(name)) {
- console.log(`preventing recursive inclusion of bundle ${name}`);
+ if (prefix === TYPE_PREFIX.BAG) {
+ if (processed_bags.has(name)) {
+ console.log(`preventing recursive inclusion of bag ${name}`);
continue;
}
- var bundle = storage.get(TYPE_PREFIX.BUNDLE, name);
+ var bag = storage.get(TYPE_PREFIX.BAG, name);
- if (bundle === undefined) {
- console.log(`no bundle in storage for key ${name}`);
+ if (bag === undefined) {
+ console.log(`no bag in storage for key ${name}`);
continue;
}
- processed_bundles.add(name);
- await send_scripts_rec(bundle, port, processed_bundles);
- processed_bundles.delete(name);
+ processed_bags.add(name);
+ await send_scripts_rec(bag, port, processed_bags);
+ processed_bags.delete(name);
} else {
let script_text = await get_script_text(name);
if (script_text === undefined)