Commit Graph

59 Commits

Author SHA1 Message Date
Dave Townsend
8ca92a1c30 Bug 1864896: Autofix unused function arguments (webextensions). r=extension-reviewers,zombie
Differential Revision: https://phabricator.services.mozilla.com/D202999
2024-03-05 14:21:14 +00:00
Saira Abdulla
d8dc989e1b Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 15:27:03 +00:00
Iulian Moraru
05e26cad32 Backed out 2 changesets (bug 1824612) for causing dt failures on browser_dbg-features-source-tree.js. CLOSED TREE
Backed out changeset c3f38adc818e (bug 1824612)
Backed out changeset 58ba8bb3398a (bug 1824612)
2023-05-31 17:28:16 +03:00
Saira Abdulla
cac3d1f236 Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 10:21:37 +00:00
Mark Banner
91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Gijs Kruitbosch
bc748bee0c Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 23:50:40 +00:00
Cristina Horotan
f062495d94 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch
2e04015e9c Bug 1810141 - switch consumers where there isn't an obvious URI object to use to fixupAndLoadURIString, r=mossop,geckoview-reviewers,extension-reviewers,settings-reviewers,mconley,owlish
This also updates layoutdebug.js, which in some ways pretends to be like a browser window but
is its own special snowflake. I kept the method naming conventions similar to the main
browser window.

Depends on D168394

Differential Revision: https://phabricator.services.mozilla.com/D168395
2023-02-13 12:55:25 +00:00
trickypr
589688feed Bug 1510561 - Part 16: Apply plugin:mozilla/valid-jsdoc to toolkit/components/extensions. r=geckoview-reviewers,extension-reviewers,zombie,owlish
Differential Revision: https://phabricator.services.mozilla.com/D161391
2022-11-19 11:41:48 +00:00
Alexandre Poirot
e0366a6c18 Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-10-11 20:33:51 +00:00
Cristian Tuns
c136da03a9 Backed out 5 changesets (bug 1700909) for causing mochitest failures CLOSED TREE
Backed out changeset a49f15f66ed4 (bug 1700909)
Backed out changeset 5a6b15eb1e12 (bug 1700909)
Backed out changeset 67b12d0e350b (bug 1700909)
Backed out changeset 4e6312ea547a (bug 1700909)
Backed out changeset c49eab385e1c (bug 1700909)
2022-10-10 10:38:03 -04:00
Alexandre Poirot
62214956c9 Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-10-10 11:28:05 +00:00
Andreea Pavel
734e00a91f Backed out 5 changesets (bug 1700909) for failing browser_ext_addon_debugging_netmonitor.js on a CLOSED TREE
Backed out changeset 9bc3e4820f59 (bug 1700909)
Backed out changeset 998c0ec4f9d3 (bug 1700909)
Backed out changeset 6f6fe066fc38 (bug 1700909)
Backed out changeset e53aaf8ffe5b (bug 1700909)
Backed out changeset 3dbeffe25878 (bug 1700909)
2022-09-29 19:40:43 +03:00
Alexandre Poirot
0d20bb1ccb Bug 1700909 - [devtools] Stop exposing Toolbox.descriptorFront. r=jdescottes
Instead we should we querying Toolbox.commands.descriptorFront.

Differential Revision: https://phabricator.services.mozilla.com/D157942
2022-09-29 14:43:24 +00:00
Alexandre Poirot
633eb069ef Bug 1791832 - [devtools] Convert devtools/startup JSM to ES Modules. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D157911
2022-09-26 10:48:05 +00:00
Luca Greco
230cdc7b64 Bug 1722145 - extension devtools page and panels should not be enabled/disabled when unrelated optional permissions are granted/revoked. r=mixedpuppy,robwu
Differential Revision: https://phabricator.services.mozilla.com/D120846
2021-07-27 13:56:36 +00:00
Alexandre Poirot
d9628fcd91 Bug 1699493 - [devtools] Migrate WebExtInspectedWindow front to a command. r=nchevobbe,rpl
- implement the new "inspected-window" command
- move WebExtensionInspectedWindowFront implement to the command, making the front empty
- migrate tests to use the commands instead of front
- stop maintaining the current top level target in ExtensionParent.jsm, no longer have to use watchTargets
- stop creating a new descriptor on each new target
- instead only pull one new dedicated "commands" for WebExt (still in ExtensionParent.jsm)
- remove TabDescriptor isDevToolsExtensionContext as we no longer need anything special in the descriptor
- remove now unused methods on DevToolsShims (createWebExtensionInspectedWindowFront, createDescriptorForTabForWebExtension)
- remove the now unused TabDescriptorFactory.createDescriptorForTab's "forceCreationForWebextension" option, as CommandsFactory.forTab always instantiate a brand new commands
- migrate webext to use the command instead of front

Differential Revision: https://phabricator.services.mozilla.com/D108994
2021-04-01 10:31:43 +00:00
Julian Descottes
d35816fc4d Bug 1694906 - [devtools] Wait for toolbox-ready instead of toolbox-created in ext-devtools.js r=rpl
Depends on D107052

toolbox-ready guarantees that the toolbox will have a valid target attached.

Differential Revision: https://phabricator.services.mozilla.com/D107099
2021-03-10 18:22:03 +00:00
Narcis Beleuzu
fe8e6266b2 Backed out 5 changesets (bug 1694906) for dt failures on browser_target_list_frames.js . CLOSED TREE
Backed out changeset bd5cb6f8b41f (bug 1694906)
Backed out changeset c23343373584 (bug 1694906)
Backed out changeset 02428006de51 (bug 1694906)
Backed out changeset 284e000deded (bug 1694906)
Backed out changeset 3b5269fe0113 (bug 1694906)
2021-03-10 04:52:56 +02:00
Julian Descottes
9200f89aa8 Bug 1694906 - [devtools] Wait for toolbox-ready instead of toolbox-created in ext-devtools.js r=rpl
Depends on D107052

toolbox-ready guarantees that the toolbox will have a valid target attached.

Differential Revision: https://phabricator.services.mozilla.com/D107099
2021-03-09 20:50:43 +00:00
Alexandre Poirot
f6ede7ee0f Bug 1692874 - [devtools] Read isLocalTab from descriptor instead of target front. r=rpl,jdescottes
There is still some usages in isTargetSupported,
but that would requires refactoring this method into isDescriptorSupported
and be async as some isTargetSupported only works against target as it checks for traits on it.

Differential Revision: https://phabricator.services.mozilla.com/D105201
2021-02-18 18:36:48 +00:00
ankushduacodes
8c88fe5bcc Bug 1671579 - Granting the devtools optional permission should also enabled the extension devtools page from a toolbox perspective r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D98841
2020-12-09 17:35:58 +00:00
Shane Caraveo
91eafeed63 Bug 1606862 support devtools as an optional extension permission r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D71829
2020-04-30 18:39:23 +00:00
Daniel Varga
b2d89104a2 Backed out changeset 8a0b81f6263e (bug 1606862) for causing devtools failures at devtools/client/framework/test/browser_toolbox_toolbar_reorder_with_extension.js
CLOSED TREE
2020-04-30 06:05:20 +03:00
Shane Caraveo
f19f5b74d5 Bug 1606862 support devtools as an optional extension permission r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D71829
2020-04-30 01:50:34 +00:00
Dorel Luca
047d3a2819 Backed out changeset 74dce6390e5e (bug 1606862) for Xpcshell failures in extensions/test/xpcshell/test_ext_startup_perf.js. CLOSED TREE 2020-04-30 04:17:57 +03:00
Shane Caraveo
12de1703e2 Bug 1606862 support devtools as an optional extension permission r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D71829
2020-04-29 23:28:27 +00:00
Daisuke Akatsuka
47a20a851d Bug 1604211: Introduce target-switching mechanism for devtools inspectedWindow. r=rpl,ochameau,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D66736
2020-04-24 04:35:51 +00:00
Oana Pop Rus
fb0835b761 Backed out 19 changesets (bug 1615509) for node failures. CLOSED TREE
Backed out changeset c74ae992992f (bug 1615509)
Backed out changeset c6fabe2143a4 (bug 1615509)
Backed out changeset 29b2f9ef4188 (bug 1615509)
Backed out changeset 2df6831aea1a (bug 1615509)
Backed out changeset 85bd4b410435 (bug 1615509)
Backed out changeset d669aefdfeba (bug 1615509)
Backed out changeset 24d5cb462667 (bug 1615509)
Backed out changeset da84734dca0c (bug 1615509)
Backed out changeset d4a3ac741275 (bug 1615509)
Backed out changeset 96be8d39bc09 (bug 1615509)
Backed out changeset 326ea09ed737 (bug 1615509)
Backed out changeset 146ee88fba20 (bug 1615509)
Backed out changeset 488e03cb9723 (bug 1615509)
Backed out changeset 8bb8d8146868 (bug 1615509)
Backed out changeset 8284770b42b4 (bug 1615509)
Backed out changeset b5bd9789553e (bug 1615509)
Backed out changeset 0527c1bd1b61 (bug 1615509)
Backed out changeset 984007b00335 (bug 1615509)
Backed out changeset ee220b50d171 (bug 1615509)
2020-03-12 16:27:38 +02:00
Daisuke Akatsuka
d654dbc3f5 Bug 1615509: Show throbber while processing. r=mtigley,ladybenko
Depends on D64535

Differential Revision: https://phabricator.services.mozilla.com/D65284
2020-03-12 13:54:03 +00:00
Mark Banner
1cc76add79 Bug 1620218 - Automatic code fixes for Prettier 1.18.2 upgrade. r=mossop,webcompat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D65509
2020-03-08 21:45:16 +00:00
Nicolas Chevobbe
0977391079 Bug 1566850 - Remove target.activeConsole usage in devtools extension code. r=jdescottes,rpl.
Depends on D56692

Differential Revision: https://phabricator.services.mozilla.com/D57103
2019-12-16 13:11:12 +00:00
Julian Descottes
fbd078a8ea Bug 1602371 - Rename LocalTabTargetFront tab getter to localTab r=ochameau
Depends on D56330

Renaming the "tab" getter to "localTab" will make it easier to refactor later.

Differential Revision: https://phabricator.services.mozilla.com/D56331
2019-12-13 10:38:07 +00:00
Sylvestre Ledru
f4d7743944 Bug 1562642 - Part 3 - Add missing MPL2 headers in browser & toolkit r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37217
2019-07-10 12:03:37 +00:00
Andreea Pavel
1ec8be7299 Backed out changeset 3d59cb02b6ff (bug 1562642) for eslint failure on a CLOSED TREE 2019-07-10 14:44:29 +03:00
Sylvestre Ledru
48a94b058e Bug 1562642 - Part 3 - Add missing MPL2 headers in browser & toolkit r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37217
2019-07-10 11:15:25 +00:00
Victor Porof
8eb72fd3fc Bug 1561435 - Format browser/components/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D36042
2019-07-05 09:53:32 +02:00
Andrew Swan
40b80dc372 Bug 1549192 Remove extension shutdownReason footgun r=kmag
Checking extension.shutdownReason for any purpose other than detecting
app shutdown is unreliable, since actions such as disabing, uninstalling,
etc. may happen ito an extension after it has shut down.  Remove the
temptation for api authors to write incorrect code by removing
extension.shutdownReason and replacing it with an isAppShutdown boolean
passed to shutdown handlers.

Differential Revision: https://phabricator.services.mozilla.com/D30605
2019-05-09 19:46:38 -07:00
Alexandre Poirot
90833a0490 Bug 1465635 - Merge all target fronts with Target class. r=yulia,jdescottes
This patch makes it so that all target fronts inherits from a Target class mixin.
We are using a mixin as fronts should inherit from a custom Front class,
which is augmented with its own RDP request and events defined in its spec.
(This is done via FrontClassWithSpec(spec))

Depends on D15830

Differential Revision: https://phabricator.services.mozilla.com/D15831
2019-02-02 11:24:32 +00:00
Luca Greco
ee3a9840f7 Bug 1518486 - Disable extension devtools_page for private tabs when not allowed by users. r=mixedpuppy
This patch applies the following changes:

- make sure that the WebExtensions internals do not create any devtools_page related to a private tabs' toolbox
  if the extension is not allowed to access the private browsing windows

- define a new mochitest to verify the expended behaviors on the private windows when the extension is
  allowed and not allowed

Depends on D15948

Differential Revision: https://phabricator.services.mozilla.com/D15949
2019-01-31 19:43:44 +00:00
Kris Maglione
856fa07b17 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750
2019-01-17 10:18:31 -08:00
Alexandre Poirot
2b6df33bde Bug 1503628 - Rename TabTarget to Target. r=yulia
MozReview-Commit-ID: BpmiEm05QIF

Depends on D11015

Differential Revision: https://phabricator.services.mozilla.com/D11016
2018-11-08 10:30:59 +00:00
Alexandre Poirot
548a99d5b4 Bug 1494281 - Fix possible race around devToolsTarget promise creation r=rpl
MozReview-Commit-ID: DlB05jFPtGL

Differential Revision: https://phabricator.services.mozilla.com/D6939
2018-10-01 14:45:11 +00:00
Alexandre Poirot
cce577ae01 Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-24 09:52:57 -07:00
Alexandre Poirot
973385106e Bug 1485676 - Adapt gDevTools.createTargetForTab to new TabTarget class. r=yulia
Summary: Depends On D4536

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4537

MozReview-Commit-ID: E3AIMyFgL5m
2018-09-24 09:52:50 -07:00
shindli
dbbcc1c04f Backed out 9 changesets (bug 1485676) for failures in browser/tools/mozscreenshots/devtools/browser_devtools.js CLOSED TREE
Backed out changeset d358feec4ca1 (bug 1485676)
Backed out changeset ed554dbb062f (bug 1485676)
Backed out changeset 6e78058df94d (bug 1485676)
Backed out changeset 3a6f1b0e71f4 (bug 1485676)
Backed out changeset 16d2403aa787 (bug 1485676)
Backed out changeset 454eddf52157 (bug 1485676)
Backed out changeset 926f725f2183 (bug 1485676)
Backed out changeset fb03f174bd5f (bug 1485676)
Backed out changeset ceb93dd1799a (bug 1485676)
2018-09-24 15:27:27 +03:00
Alexandre Poirot
5502b1399b Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-24 01:25:02 -07:00
Alexandre Poirot
82a879cabb Bug 1485676 - Adapt gDevTools.createTargetForTab to new TabTarget class. r=yulia
Summary: Depends On D4536

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D4537

MozReview-Commit-ID: E3AIMyFgL5m
2018-09-24 01:24:59 -07:00
Gurzau Raul
a532c08398 Backed out 9 changesets (bug 1485676) for failing at damp inspector/cold-open.js on a CLOSED TREE
Backed out changeset 4de2e71debfe (bug 1485676)
Backed out changeset e63025150c7a (bug 1485676)
Backed out changeset f9ef30ae3f7f (bug 1485676)
Backed out changeset a83636fab16a (bug 1485676)
Backed out changeset b1fd24929e09 (bug 1485676)
Backed out changeset acb27b915742 (bug 1485676)
Backed out changeset ba2157632772 (bug 1485676)
Backed out changeset d1d6b9bc2372 (bug 1485676)
Backed out changeset d7646ea8640b (bug 1485676)
2018-09-22 19:42:04 +03:00
Alexandre Poirot
ef7fa3ed18 Bug 1485676 - Rename TabTarget.makeRemote to TabTarget.attach. r=jdescottes
Summary:
Now that all the "remoting" of this method has been moved to TargetFactory.createTargetForTab,
we should rename this method to what it does now. It mostly call attach requests
of the target actor and its child console actor.
It also "connect" the webextension target actor, but I would like to eventually move that
outside of TabTarget.attach, like makeRemote.

Depends On D4078

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1485676

Differential Revision: https://phabricator.services.mozilla.com/D6161

MozReview-Commit-ID: KmFi1LIUBga
2018-09-22 08:34:21 -07:00