Commit Graph

215 Commits

Author SHA1 Message Date
Luca Greco
da625a7c47 Bug 1780008 - browserAction preload popup should not be listed in extension.getViews results. r=mixedpuppy,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D152022
2022-07-19 18:34:36 +00:00
Tooru Fujisawa
328d63ce7f Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel
f009ba2983 Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa
bf0a8b781b Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa
b10d0289af Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Tooru Fujisawa
18c50f5792 Bug 1772101 - Part 17: Use plain object for lazy getter in toolkit/components/extensions/. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D147958
2022-06-07 04:30:57 +00:00
Tooru Fujisawa
f947410342 Bug 1772351 - Part 3: Stop calling XPCOMUtils.defineLazyModuleGetters for AppConstants. r=florian,webdriver-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D148166
2022-06-06 04:42:09 +00:00
Molnar Sandor
4c2b06df41 Backed out 15 changesets (bug 1772313, bug 1772351, bug 1772360) for causing xpc failures in telemetry/tests/unit/test_SocketScalars.js CLOSED TREE
Backed out changeset c8b0a2ed239e (bug 1772360)
Backed out changeset 1922adad6abe (bug 1772351)
Backed out changeset 6d3634cce489 (bug 1772351)
Backed out changeset f03968a9d053 (bug 1772351)
Backed out changeset e7a38ef90fe4 (bug 1772351)
Backed out changeset b389e7654771 (bug 1772313)
Backed out changeset 59a33598ff51 (bug 1772313)
Backed out changeset ab60885a8a93 (bug 1772313)
Backed out changeset aad8efac9d05 (bug 1772313)
Backed out changeset 4378e519a8e7 (bug 1772313)
Backed out changeset 302ac54741f8 (bug 1772313)
Backed out changeset 74c59f9fd51c (bug 1772313)
Backed out changeset 575fb877c56c (bug 1772313)
Backed out changeset 2eaa68f10b19 (bug 1772313)
Backed out changeset 4a8b3ba193dc (bug 1772313)
2022-06-06 07:04:25 +03:00
Tooru Fujisawa
b580e51d8f Bug 1772351 - Part 3: Stop calling XPCOMUtils.defineLazyModuleGetters for AppConstants. r=florian,webdriver-reviewers,whimboo,robwu
Differential Revision: https://phabricator.services.mozilla.com/D148166
2022-06-06 02:49:13 +00:00
Rob Wu
51fde98370 Bug 1766822 - Decouple WebExtensionPolicy update from BrowserExtensionContent r=willdurand,zombie
This ensures that WebExtensionPolicy is properly initialized even when
ExtensionProcessScript has not instantiated BrowserExtensionContent yet.

Differential Revision: https://phabricator.services.mozilla.com/D147331
2022-05-27 17:02:04 +00:00
Rob Wu
6158a0deca Bug 1766822 - Refactor, introduce updateAllowedOrigins r=willdurand
Introduce common updateAllowedOrigins helper to avoid repetition of
policy.allowedOrigins-updating logic in four places.

While there are no user-visible behavioral changes, the patch does fix a
small issue: previously policy.allowedOrigins could have multiple
MatchPattern instances with exactly the same pattern due to the
implementation in ExtensionChild, now the helper ensures that all
patterns are unique.

Differential Revision: https://phabricator.services.mozilla.com/D147330
2022-05-27 17:02:04 +00:00
Luca Greco
1915f507fa Bug 1768522 - ExtensionBaseContextChild instances should not be active after navigating it to a page running in another process under fission. r=robwu
This patch is making sure that `context.active` is going to be `false` when an extension page
has been moved into the bfcache because the `browser` element where it was loading into has been navigated
to a page that needs to run in a different process.

This also match the expected behavior for a same process navigation (e.g. an extension page being navigated
to another extension page) and the changes in this patch do also fix Bug 1499129 which was already happening
for same process navigations (and it does the same also for an extension page moved to the bfcache because
of a cross-process navigation case tracked by this bug).

The test case included in this patch cover both same-process and cross-process navigations under fission
and non fissions jobs.

Differential Revision: https://phabricator.services.mozilla.com/D145919
2022-05-19 18:51:35 +00:00
Luca Greco
2fab75125b Bug 1759300 - Cancel suspend on idle if the extension EventPage has StreamFilter instances still active. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D145257
2022-05-09 20:33:28 +00:00
Luca Greco
bbcb88d5b0 Bug 1761828 - Propagate isHandlingUserInput from ProxyAPIImplementation.callAsyncFunction. r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D143188
2022-04-21 19:32:53 +00:00
Shane Caraveo
d47baeee32 Bug 1748558 enforce requirement of id in menus apis for event pages r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D138489
2022-04-04 22:16:55 +00:00
Shane Caraveo
d38ab0c280 Bug 1748550 Event Persistence subclass to simplify use r=rpl,robwu
Differential Revision: https://phabricator.services.mozilla.com/D139087
2022-03-02 03:59:48 +00:00
Luca Greco
b980a9fae1 Bug 1728326 - Notify main process when the extension background service worker has been fully loaded. r=zombie
Additional changes needed to observe the "extension-worker-loaded" topics and notify the main process when the background
service worker script has been fully loaded (similarly to how we notify the main process when
the background page has been fully loaded).

Differential Revision: https://phabricator.services.mozilla.com/D124704
2021-11-05 21:27:04 +00:00
Marian-Vasile Laza
f89640f067 Backed out 10 changesets (bug 1728326) for causing build bustages. CLOSED TREE
Backed out changeset 39267f23ee63 (bug 1728326)
Backed out changeset 070f187c2005 (bug 1728326)
Backed out changeset f06e0af1bf81 (bug 1728326)
Backed out changeset d21475767077 (bug 1728326)
Backed out changeset 4ca5e36e3c71 (bug 1728326)
Backed out changeset fd700124d69b (bug 1728326)
Backed out changeset 5c8d87c04ac6 (bug 1728326)
Backed out changeset 247504b7ea84 (bug 1728326)
Backed out changeset de8879fc8126 (bug 1728326)
Backed out changeset ebf25d0924d6 (bug 1728326)
2021-11-05 22:48:14 +02:00
Luca Greco
d60890ba2d Bug 1728326 - Notify main process when the extension background service worker has been fully loaded. r=zombie
Additional changes needed to observe the "extension-worker-loaded" topics and notify the main process when the background
service worker script has been fully loaded (similarly to how we notify the main process when
the background page has been fully loaded).

Differential Revision: https://phabricator.services.mozilla.com/D124704
2021-11-05 20:27:02 +00:00
Luca Greco
4c2b10b126 Bug 1735106 - Move classes only used for background service worker contexts into a lazy loaded ExtensionWorkerChild.jsm. r=zombie
Currently all the WebExtensions internals related to background service worker are going to be unused
in non-nightly channels (where the background service worker is disabled at build time), and so we should
defer loading any of the internal classes related to the background service worker, up until an extension
context for an extension background service worker is actually being created.

This patch includes the changes needed to:

- move WorkerMessenger, WebIDLChildAPIManager and WorkerContextChild classes (and other classes used internally only by
  this classes) into a new ExtensionWorkerChild.jsm file

- ensure ExtensionProcessScript.jsm will load ExtensionWorkerChild lazily, once an instance
  of the WorkerContextChild class for a newly spawned extension background service worker
  has to be created

Differential Revision: https://phabricator.services.mozilla.com/D128086
2021-10-11 19:35:47 +00:00
Luca Greco
6575211b2c Bug 1688040 - part8.2: Handle ExtensionPort API requests r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D106705
2021-10-06 12:28:23 +00:00
Luca Greco
0dc7ceab9a Bug 1688040 - part7.3: Adapt child/ext-runtime.js to handle webidl API request. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D106702
2021-10-06 12:28:21 +00:00
Luca Greco
85b91f5c2d Bug 1688040 - part2.2: validate and normalize webidl API requests arguments using the JSON API schemas r=zombie,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D86204
2021-10-06 12:28:18 +00:00
Luca Greco
598b22f5ba Bug 1688040 - part1.2: Prototype handling API requests for API modules implemented on the main process r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86199
2021-10-06 12:28:16 +00:00
Luca Greco
89c592bfd9 Bug 1688040 - part1.1: Prototype forwarding API request for local implemented API to ext-*.js modules. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86198
2021-10-06 12:28:15 +00:00
Iulian Moraru
7e43871db1 Backed out 27 changesets (bug 1688040) for causing multiple failures. CLOSED TREE
Backed out changeset 85ba163b6423 (bug 1688040)
Backed out changeset 36cdc1600e66 (bug 1688040)
Backed out changeset 88395ab5a5b5 (bug 1688040)
Backed out changeset 8d33bdd8d0b8 (bug 1688040)
Backed out changeset fdbced7a94f3 (bug 1688040)
Backed out changeset 922ca2f20fa1 (bug 1688040)
Backed out changeset 7fc233bf144c (bug 1688040)
Backed out changeset 64221db54d98 (bug 1688040)
Backed out changeset 4d9b2a9dd247 (bug 1688040)
Backed out changeset c8d890f1a8e2 (bug 1688040)
Backed out changeset 81e957717eb1 (bug 1688040)
Backed out changeset b7dcade29dab (bug 1688040)
Backed out changeset 20e38838aa89 (bug 1688040)
Backed out changeset 08737e7ea047 (bug 1688040)
Backed out changeset b82645d5b7c7 (bug 1688040)
Backed out changeset db374d34839a (bug 1688040)
Backed out changeset 6a2ebb56325d (bug 1688040)
Backed out changeset 7d0ce555263f (bug 1688040)
Backed out changeset 15e0689a57f0 (bug 1688040)
Backed out changeset d7d6b1bec92a (bug 1688040)
Backed out changeset 615b683acb00 (bug 1688040)
Backed out changeset 49d3e1baf577 (bug 1688040)
Backed out changeset 30cc613912ce (bug 1688040)
Backed out changeset d413ec19bded (bug 1688040)
Backed out changeset cfdf6e87d820 (bug 1688040)
Backed out changeset f719b9d0bc25 (bug 1688040)
Backed out changeset 925f23a58da6 (bug 1688040)
2021-10-05 22:49:40 +03:00
Luca Greco
226cc928b4 Bug 1688040 - part8.2: Handle ExtensionPort API requests r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D106705
2021-10-05 17:05:43 +00:00
Luca Greco
1bc66ba74e Bug 1688040 - part7.3: Adapt child/ext-runtime.js to handle webidl API request. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D106702
2021-10-05 17:05:42 +00:00
Luca Greco
7cf3005892 Bug 1688040 - part2.2: validate and normalize webidl API requests arguments using the JSON API schemas r=zombie,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D86204
2021-10-05 17:05:38 +00:00
Luca Greco
69274765b4 Bug 1688040 - part1.2: Prototype handling API requests for API modules implemented on the main process r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86199
2021-10-05 17:05:36 +00:00
Luca Greco
ae0b3dec24 Bug 1688040 - part1.1: Prototype forwarding API request for local implemented API to ext-*.js modules. r=zombie
Differential Revision: https://phabricator.services.mozilla.com/D86198
2021-10-05 17:05:35 +00:00
Tomislav Jovanovic
e9f6c7f260 Bug 1708243 - Part 3: Use actor messaging for tabs.detectLanguage, stop loading MessageChannel.jsm, r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D126623
2021-09-29 16:52:59 +00:00
Tomislav Jovanovic
007d45809d Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 23:15:17 +00:00
criss
952851eac2 Backed out changeset a269440d7e21 (bug 1708243) for causing failures on mochitest/test_ext_tabs_create.html. CLOSED TREE 2021-08-31 23:22:19 +03:00
Tomislav Jovanovic
f3de0ca755 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 18:48:17 +00:00
Csoregi Natalia
042ea59c67 Backed out changeset f966b7898d9f (bug 1708243) for geckoview failures. CLOSED TREE 2021-08-31 18:40:20 +03:00
Tomislav Jovanovic
03e6dbf364 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 11:46:11 +00:00
Marian-Vasile Laza
59ce1ed270 Backed out changeset 1395c54325a7 (bug 1708243) for causing gv-junit failures. CLOSED TREE 2021-08-31 06:53:43 +03:00
Tomislav Jovanovic
2fd100c9da Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-31 00:21:38 +00:00
Marian-Vasile Laza
98586de04c Backed out changeset 38cfb452cecf (bug 1708243) for causing mochitest failures on test_ext_tabs_sendMessage.html. CLOSED TREE 2021-08-31 02:40:51 +03:00
Tomislav Jovanovic
17daa8e5d9 Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-30 22:54:47 +00:00
Narcis Beleuzu
123fc4c3ae Backed out changeset e49874b751fa (bug 1708243) for bc failures on browser_shims.js . CLOSED TREE 2021-08-25 19:23:32 +03:00
Tomislav Jovanovic
f9181cbf8a Bug 1708243 - Part 2: stop using sender data from the child process r=robwu,agi
Differential Revision: https://phabricator.services.mozilla.com/D123351
2021-08-25 12:00:34 +00:00
Florian Quèze
9370b8759b Bug 1716343 - Add profiler markers for Web Extension API calls, r=mixedpuppy.
Differential Revision: https://phabricator.services.mozilla.com/D118529
2021-07-28 17:22:09 +00:00
Shane Caraveo
364da57f68 Bug 1696580 Add support for object form of web_accessible_resources r=zombie
This is the initial level of support for MV3 web_accessible_resources, which simply moves the
resource list into an object notation.  It lays out the framework to support the additional functionality
that will be implemented in followup bugs.

Differential Revision: https://phabricator.services.mozilla.com/D107310
2021-05-14 03:15:15 +00:00
Shane Caraveo
65bdc2eab9 Bug 1693403 support manifest versioning in schema r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D105821
2021-04-30 20:31:39 +00:00
Rob Wu
8645430c15 Bug 1655624 - Improve reliability of onMessage's error handling r=zombie
Bug 1655624 happened because the format of an internal error changed,
which caused an internal error to be propagated unexpectedly.
This patch fixes the issue by only propagating errors that are known to
originate from extensions, plus a regression test.

This patch also fixes a few other issues:

- Internal errors are redacted to "An unexpected error occurred",
  which partially fixes bug 1643176.

- Fix minor regression in void rejections: Prior to bug 1583484, an
  onMessage handler that rejected with a void value would cause
  sendMessage to reject. Since bug 1583484 the promise is not rejected,
  as the error is inadvertently ignored due to a runtime error:
  "TypeError: can't access property "result", err is undefined".

- Avoid type confusion of objects with the mozWebExtLocation member.

Differential Revision: https://phabricator.services.mozilla.com/D85643
2020-08-12 14:28:04 +00:00
Bogdan Tara
8aa58d19cb Backed out changeset 46abf66e3b20 (bug 1655624) for test_ext_error_location.js failures CLOSED TREE 2020-08-12 17:07:08 +03:00
Rob Wu
8f9e76a0bd Bug 1655624 - Improve reliability of onMessage's error handling r=zombie
Bug 1655624 happened because the format of an internal error changed,
which caused an internal error to be propagated unexpectedly.
This patch fixes the issue by only propagating errors that are known to
originate from extensions, plus a regression test.

This patch also fixes a few other issues:

- Internal errors are redacted to "An unexpected error occurred",
  which partially fixes bug 1643176.

- Fix minor regression in void rejections: Prior to bug 1583484, an
  onMessage handler that rejected with a void value would cause
  sendMessage to reject. Since bug 1583484 the promise is not rejected,
  as the error is inadvertently ignored due to a runtime error:
  "TypeError: can't access property "result", err is undefined".

- Avoid type confusion of objects with the mozWebExtLocation member.

Differential Revision: https://phabricator.services.mozilla.com/D85643
2020-08-12 12:26:06 +00:00
Kris Maglione
4ba9ea2caa Bug 1647205: Remove getWinUtils helper. r=zombie
It isn't useful now that there is a `Window.windowUtils` WebIDL getter, and it
causes problems in the face of certain WeakMap issues.

Differential Revision: https://phabricator.services.mozilla.com/D82795
2020-07-08 21:59:51 +00:00