Commit graph

444 commits

Author SHA1 Message Date
Kris Maglione
b219ce3bfc Bug 1484373: Part 12 - Use policy object rather than keeping serialized extension data alive. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D3702

--HG--
extra : rebase_source : e0857c69ef43ea675ae0c5541c48789356aa1a07
extra : histedit_source : 16715fa00f0949c3a544656c64ae118ae2a652fd
2018-08-18 00:10:53 -07:00
Kris Maglione
c6994239e3 Bug 1484373: Part 5 - Minimize the amount of content script options processing we do in child processes r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D3695

--HG--
extra : rebase_source : 5e99ca727b84d376744f6937bf96c60882038dec
extra : histedit_source : 2c3621e71dec052992a7d4f4ca33efd748f069ba
2018-08-17 20:02:52 -07:00
Luca Greco
f31071f798 Bug 1480948 - Defer or await storage.local data migration on extension shutdown. r=aswan
MozReview-Commit-ID: HGdd2jO0WQy

--HG--
extra : rebase_source : 6473952d53b7ed12f38086117d2a82a8c5ef475e
2018-08-04 17:00:41 +02:00
Luca Greco
f55e636331 Bug 1477015 - Select storage.local backend on startup when the extension is not migrating its data. r=aswan,mixedpuppy
MozReview-Commit-ID: WzW2bFlYNg

--HG--
extra : rebase_source : 048dbd36e6bf1bfc64d02e11bf26af1392071139
2018-07-26 13:53:22 +02:00
Andrew Swan
ad31645d25 Bug 1451513 Part 3: Make loading the mochitest extension more robust r=kmag
A couple of changes to ensure that the mochitest harness doesn't try to
start executing changes before the mochitest extension is loaded:
1. Fix the marionette driver to wait for an installed extension to
   be started before returning from Addon:install
2. Wait for extension API onStartup() handlers to finish before
   considering a webextension started.

MozReview-Commit-ID: 8YEdNn6s5qh

--HG--
extra : rebase_source : 67e9abadcda82d55ac73c33367ec65cdbf7b823d
2018-07-30 17:03:27 -07:00
Kris Maglione
a923510bfa Bug 1464938: Stop needlessly waiting for responses to startup messages. r=aswan
MozReview-Commit-ID: 328wmW1CZ9L

--HG--
extra : rebase_source : 7563f637d799e8108431faf062ac176f7e8180d9
2018-07-25 12:05:22 -07:00
Luca Greco
dd38ea4159 Bug 1475306 - Changes to the detection of extensions already migrated to ExtensionStorageIDB and rename successfully migrated JSONFile. r=mixedpuppy
This patch applies the following changes to the storage.local data migration behaviors:

- An about:config preference is set when an extension has been migrated successfully to the
  storage.local IndexedDB backend (cleared automatically if the addon is uninstalled).
- If the above about:config preference is set, the storage.local IndexedDB backend is enabled
  without attempting to open an IndexedDB connection for the new backend.
- While migrating an extension, if we fail to open the IndexedDB connection, the data migration
  is cancelled and the storage.local API is going to fallback to the storage.local JSONFile backend
  (until the next extension startup, when a new data migration is going to be tried).
- When a migration is completed successfully, the old JSONFile is renamed (by appending ".migrated"
  to its original file name) instead of being removed.

MozReview-Commit-ID: LPM0fQUagTd

--HG--
extra : rebase_source : 11c3e291ac8323a679c2bb29efc7df3700023591
2018-07-06 19:07:28 +02:00
Kris Maglione
84aacf4890 Bug 1470783: Migrate extensions framework to use sharedData for cross-process data. r=zombie
initialProcessData has the unfortunate side-effect of sending an entire copy
of all of its data to all content processes, and eagerly decoding it. For the
extension framework, this means that we wind up loading an entire copy of all
of our schema data, and of every extension's manifest and locale data, into
every process, even if we'll never need it.

The sharedData helper allows us to store an encoded copy of that data in a
shared memory region, and clone it into the current process only when we need
it, which can be a significant savings. For screenshots alone, it saves about
15K on locale and manifest data per content process, plus the size we save on
not copying schema data.

MozReview-Commit-ID: KkIOoLsBd99

--HG--
extra : rebase_source : 21cb433e8897a3d33943ebbd3d788d8d54e0844b
extra : source : 8074c985095c9951171311dac840684b915a57f6
2018-06-24 16:34:44 -07:00
Margareta Eliza Balazs
7b416abaf1 Backed out 10 changesets (bug 1470783, bug 1463587) for causing multiple leakcheck failures on a CLOSED TREE
Backed out changeset cd2080bd727a (bug 1463587)
Backed out changeset 5866137afd9a (bug 1463587)
Backed out changeset d64e1c150db2 (bug 1463587)
Backed out changeset 669f084e8914 (bug 1463587)
Backed out changeset 8074c985095c (bug 1470783)
Backed out changeset 49ed13196e9f (bug 1463587)
Backed out changeset c052042a66cf (bug 1463587)
Backed out changeset cebf1f055d1d (bug 1463587)
Backed out changeset 2ebaf5f8c605 (bug 1463587)
Backed out changeset c27295337b4c (bug 1463587)
2018-07-12 11:27:45 +03:00
Kris Maglione
4cae71af86 Bug 1470783: Migrate extensions framework to use sharedData for cross-process data. r=zombie
initialProcessData has the unfortunate side-effect of sending an entire copy
of all of its data to all content processes, and eagerly decoding it. For the
extension framework, this means that we wind up loading an entire copy of all
of our schema data, and of every extension's manifest and locale data, into
every process, even if we'll never need it.

The sharedData helper allows us to store an encoded copy of that data in a
shared memory region, and clone it into the current process only when we need
it, which can be a significant savings. For screenshots alone, it saves about
15K on locale and manifest data per content process, plus the size we save on
not copying schema data.

MozReview-Commit-ID: KkIOoLsBd99

--HG--
extra : rebase_source : 294a3fb2f045bef044cfbebe6fc6f1b1ee2be91b
2018-06-24 16:34:44 -07:00
Kris Maglione
fcedebb912 Bug 1471102: Move more code out of ExtensionUtils.jsm. r=aswan
MozReview-Commit-ID: Fqlv5BRuuW8

--HG--
extra : rebase_source : 348f037abd9cecfa080183bc365e5f005eac1bd6
extra : amend_source : 05dbfd12f553fc3f2a93374402e34d271e26d767
2018-06-25 19:30:21 -07:00
Kris Maglione
670fc0f25f Bug 1464743: Restore extension child shutdown timeout. r=aswan
MozReview-Commit-ID: 8O6CgKsOwom

--HG--
extra : rebase_source : d956c911188fc12451ac6fe8491b9fe87f2d6677
extra : histedit_source : 34c2fc20b42be87651124bca0ebe4d1572321100
2018-06-06 12:43:26 -07:00
Luca Greco
f0b87740f5 Bug 1406181 - Add ExtensionStorageIDB JSM module. r=aswan
This patch defined a new ExtensionStorageIDB module, which provides the
same "internal" API currently provided by ExtensionStorage and uses
IndexedDB as its backend (instead of the JSONFile used as the backend
provided by ExtensionStorage).

MozReview-Commit-ID: DsvPudExcyr

--HG--
extra : rebase_source : c1046955a3aaf226bba9d1cd7aacd86808c536a7
2017-10-17 04:12:15 +02:00
Andrew Swan
f1fb18cb79 Bug 1369841 Make browser.runtime.onMessage and onConnect persistent r=zombie
MozReview-Commit-ID: 4LdBeEERtsD

--HG--
extra : rebase_source : 80b422ce41872e57e0a6f614af340aaf4a507e70
2018-05-29 17:40:53 -07:00
Cosmin Sabou
835f7407b3 Backed out 10 changesets (bug 1406181) as per developers request.
Backed out changeset 06461ddb2699 (bug 1406181)
Backed out changeset fd61d9faedf0 (bug 1406181)
Backed out changeset b52c2fb70ae1 (bug 1406181)
Backed out changeset 4f387b4a76a9 (bug 1406181)
Backed out changeset db783c96c076 (bug 1406181)
Backed out changeset 62e9126ecd0d (bug 1406181)
Backed out changeset d34810cab822 (bug 1406181)
Backed out changeset 3241c2dfb296 (bug 1406181)
Backed out changeset 912a2eaf4d26 (bug 1406181)
Backed out changeset fdac47b8ef20 (bug 1406181)
2018-06-03 16:10:23 +03:00
Andreea Pavel
bb80b73970 Backed out changeset 5cd398cc6a4b (bug 1369841) for failing browser chrome at browser/components/extensions/test/browser/browser_ext_legacy_extension_context_contentscript.js on a CLOSED TREE 2018-06-03 00:48:16 +03:00
Andrew Swan
91271d4735 Bug 1369841 Make browser.runtime.onMessage and onConnect persistent r=zombie
MozReview-Commit-ID: 4LdBeEERtsD

--HG--
extra : rebase_source : e6fe6f2e8ceab9ef1bd760f3abc1175868879cfa
2018-05-29 17:40:53 -07:00
Luca Greco
d3c09d3243 Bug 1406181 - Add ExtensionStorageIDB JSM module. r=aswan
This patch defined a new ExtensionStorageIDB module, which provides the
same "internal" API currently provided by ExtensionStorage and uses
IndexedDB as its backend (instead of the JSONFile used as the backend
provided by ExtensionStorage).

MozReview-Commit-ID: DsvPudExcyr

--HG--
extra : rebase_source : f67691b7775cd8961f3152f1fa8becee7eaddb2e
2017-10-17 04:12:15 +02:00
Kris Maglione
f72f5fc596 Bug 1461145: Follow-up: Fix more racy tests. r=bustage CLOSED TREE
MozReview-Commit-ID: 7uep5FCvVwC

--HG--
extra : rebase_source : 22e6c32288fe6dfd72625eabdebb1bb5c4637069
2018-05-27 17:53:01 -07:00
Kris Maglione
2fe5dce32f Bug 1457321: Part 3 - Load built-in dictionaries from omnijar rather than scanning directories. r=aswan,ehsan
MozReview-Commit-ID: CgYHrcJsYfE

--HG--
extra : rebase_source : 5abbdcb64b30e8f7f3b568b4adf7a047b2a1bf79
2018-04-27 13:43:50 -07:00
Kris Maglione
6ac523347a Bug 1461145: Support async startup/shutdown bootstrap methods. r=aswan
MozReview-Commit-ID: L0G4DA0KJ87

--HG--
extra : rebase_source : b774d70d11c47d138535685104c5d5bc197f7866
2018-05-12 18:51:32 -07:00
Kris Maglione
54d867ef69 Bug 1456485: Part 2 - Allow extensions with the mozillaAddons permission to match restricted schemes. r=zombie
The schema handling for this is currently a bit ugly, for the sake of
simplifying uplift. In the figure, we should find a way to change the schema
pattern matching based on whether or not the extension is privileged.

MozReview-Commit-ID: CU9WR2Ika6k

--HG--
extra : rebase_source : 28e1c43cf0f0efc01b40757e4e65c4ac5d882258
2018-05-09 18:55:59 -07:00
Kris Maglione
aa484dadb6 Bug 1460748: Load the correct affix file for WebExtension dictionaries. r=aswan
MozReview-Commit-ID: 1arZbiexgma

--HG--
extra : rebase_source : c2553ef5899a8880f3862c4bcbb32e1c23421a37
2018-05-10 15:42:29 -07:00
Andrew Swan
c53637983d Bug 1457224 Clean up extension testing helpers r=zombie
- Remove outdated appChanged logic from test helper function to start
  the AddonManager
- Avoid calling to the AddonManager in webextension tests that don't
  otherwise require the AddonManager

MozReview-Commit-ID: Fx4o1TzXTCd

--HG--
extra : rebase_source : a81a09a6ab25eac5ae00b5d80b91509448c95748
extra : histedit_source : 5bb2abe1f6c4f4ee2feced32930c417771752478
2018-04-30 13:01:10 -07:00
Zibi Braniecki
de99bf8e10 Bug 1455766 - Handle langpacks versions properly. r=aswan
MozReview-Commit-ID: HhY5SQOtFl7

--HG--
extra : rebase_source : 57ff738b01c8ba30434a1cf7c8f48d21ab82d5b7
2018-04-26 14:01:26 -07:00
Jonathan Kingston
14792a82ae Bug 1454820 - Add support for system addon signing for web extension bundling. r=johannh,kmag
MozReview-Commit-ID: 3dpQKGHOgLa

--HG--
extra : rebase_source : d10066d985118d82d3fcb30bcc81cd255b70d366
2018-04-18 00:43:39 +01:00
Cosmin Sabou
a9f70f3fe8 Backed out changeset 5e8342edb62d (bug 1454820) mochitest e-10s failures on test_bug386782.html. CLOSED TREE 2018-04-27 19:50:26 +03:00
Jonathan Kingston
75441127ab Bug 1454820 - Add support for system addon signing for web extension bundling. r=johannh,kmag
MozReview-Commit-ID: 3dpQKGHOgLa

--HG--
extra : rebase_source : 887bbeb5429f765eb8222a833ef4783d91fe8ae7
2018-04-18 00:43:39 +01:00
Cosmin Sabou
70a151f470 Backed out changeset 7e3aa63ae752 (bug 1454820) for ESlint failure on extensions/Extension.jsm:509:22. CLOSED TREE 2018-04-27 14:46:19 +03:00
Jonathan Kingston
bd4b4207f0 Bug 1454820 - Add support for system addon signing for web extension bundling. r=johannh,kmag
MozReview-Commit-ID: 3dpQKGHOgLa

--HG--
extra : source : 8141b60030b908c1f291979d72e0f21db8206c5c
2018-04-18 00:43:39 +01:00
Kris Maglione
f55bef228c Bug 1410214: Part 3 - Support packed WebExtension dictionaries. r=aswan,masayuki
MozReview-Commit-ID: 6nrw0IIe4UG

--HG--
extra : rebase_source : 3e2c2b24bd7a9136d326da9bea3d1dc197cb908b
extra : absorb_source : 9f7ab2b81c220463b82a74cb64e93528a54ff2c4
2018-04-26 13:26:05 -07:00
Kris Maglione
d3904fd92f Bug 1410214: Part 1 - Implement support for WebExtension-style dictionary add-ons. r=aswan,gandalf
MozReview-Commit-ID: 3oylyEBgrzB

--HG--
extra : rebase_source : 640a71111fb84506906a2b150ea3d18339ebbdab
2018-04-26 13:32:38 -07:00
Kris Maglione
e77bbb4f83 Bug 1452307: Remove support for old-style experiment API extensions. r=aswan
MozReview-Commit-ID: 5y48pMRQ5XW

--HG--
extra : rebase_source : 72337be11a0e5d7ebe6bb01d5ad71cb1da1cda7b
extra : histedit_source : bcba1a6a848e16aba9e4f4f606b11ba631c85e2e
2018-04-06 18:14:59 -07:00
Andrew Swan
84175ef69b Bug 1450388 Part 2: Expose startupData to webextensions r=kmag
MozReview-Commit-ID: AbqR3hECLZe

--HG--
extra : rebase_source : 272926b56b90a89e77aa137e6272ce1115cd2fe0
2018-03-21 10:22:13 -07:00
Kris Maglione
883c7e5fce Bug 1446821: Add shutdown blocker for async extension uninstall tasks. r=mixedpuppy
MozReview-Commit-ID: AMHkqviDMoV

--HG--
extra : rebase_source : 2986a4e1e1c9deb3bc4ae38ef6fd703f273db61b
extra : amend_source : 5bb6ada7ff2e46ae5005ea8556dfd5f102c74e66
2018-03-18 13:59:56 -07:00
Tiberius Oros
61d400da1c Merge inbound to mozilla-central. a=merge 2018-03-01 19:29:00 +02:00
Zibi Braniecki
fdf11165d8 Bug 1441135 - Stash all data needed for langpack startup in the startupCache. r=aswan
MozReview-Commit-ID: 763VkrRGvCq

--HG--
extra : rebase_source : cdb5411663ebe9ccbc1a9a4b1574dc50857c7ecb
2018-02-27 10:55:19 -08:00
Andrew Swan
5275f0b23f Bug 1402850 Don't include runtime permissions in prompts for webextension updates r=zombie
MozReview-Commit-ID: 1cnNsWLVGmg

--HG--
extra : source : 91675759981c8e6185e6dc67ed88103265b135d8
extra : amend_source : 889380c90839eef813ec14a93b66de2d5ac9ab45
extra : intermediate-source : 947bafefb106318708f5971e49898210d35e2af2
2017-11-08 17:14:11 -08:00
Cosmin Sabou
ec7cfbcbdf Backed out 2 changesets (bug 1402850) for mochitest browser chrome failures at browser_ext_devtools_inspectedWindow.js on a CLOSED TREE
Backed out changeset 839b847c943e (bug 1402850)
Backed out changeset 85b12303f147 (bug 1402850)
2018-02-28 23:13:23 +02:00
Andrew Swan
aa8c33b004 Bug 1402850 Don't include runtime permissions in prompts for webextension updates r=zombie
MozReview-Commit-ID: 1cnNsWLVGmg

--HG--
extra : rebase_source : 4237b853d3a94afe2a99ca4e44d5820b284679a6
extra : intermediate-source : 6f79b872b6102cc7dd1d24bfaaa36d95166c2671
extra : source : 91675759981c8e6185e6dc67ed88103265b135d8
2017-11-08 17:14:11 -08:00
Narcis Beleuzu
bab96064ac Backed out 1 changesets (bug 1441135) for xpcshell failures on test_webextension_langpack.js. CLOSED TREE
Backed out changeset f027c3d45c47 (bug 1441135)
2018-03-01 03:17:44 +02:00
Zibi Braniecki
4149253ce5 Bug 1441135 - Stash all data needed for langpack startup in the startupCache. r=aswan
MozReview-Commit-ID: 763VkrRGvCq

--HG--
extra : rebase_source : 8b5dc5dfa6528a9b327ede464ffcbcc5559e8c6b
2018-02-27 10:55:19 -08:00
Florian Quèze
682b1ec3b2 Bug 1440284 - change this.EXPORTED_SYMBOLS back to var EXPORTED_SYMBOLS in JS modules, r=mccr8. 2018-02-23 20:50:01 +01:00
Prathiksha
b28f3f4deb Bug 1431242 - Use popupnotification's built-in bolding for webextension prompts. r=aswan,johannh
MozReview-Commit-ID: 52AtWUlJj4p

--HG--
extra : rebase_source : deb657d44fb1306a49d2c38cc3632928b49ab6e8
2018-01-19 23:34:25 +05:30
Andrew McCreight
5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00