Граф коммитов

21931 Коммитов

Автор SHA1 Сообщение Дата
Belén Albeza a91fb8ce84 Bug 1677697 - Fix storage actors being instanced twice r=ochameau
This avoids instancing twice the different storage type actors (legacy and resources). In order to keep current server tests working, a pref to force instancing legacy actors has been introduced.

Differential Revision: https://phabricator.services.mozilla.com/D97287
2020-11-17 15:53:28 +00:00
Alexandre Poirot 7f97511367 Bug 1676810 - [devtools] Use a shared WatchedData module in order to update cross process data object. r=jdescottes
This will allow to better handle more complex data like breakpoints.

Differential Revision: https://phabricator.services.mozilla.com/D96805
2020-11-18 09:23:34 +00:00
Sylvestre Ledru bebb9f9181 Bug 1519636 - Reformat with clang-format-11 to the Google coding style r=andi,sg,geckoview-reviewers,snorp
It is bringing some minor changes

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90795
2020-11-18 09:05:59 +00:00
Hubert Boma Manilla 6e19a79a32 Bug 1677546 - [devtools] Rename network actors to parent and content actors r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97239
2020-11-17 23:21:26 +00:00
Emilio Cobos Álvarez 203f4a1e40 Bug 1677693 - Show -moz-outline-radius as inactive when outline-style is auto. r=rcaliman,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D97281
2020-11-17 17:04:18 +00:00
Alexandre Poirot b6defeeb72 Bug 1676808 - [devtools] Rename all watcher to watcherFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96859
2020-11-17 11:15:40 +00:00
Alexandre Poirot 03ce56bda3 Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
2020-11-17 11:15:38 +00:00
Alexandre Poirot ee7d0f17ec Bug 1676808 - [devtools] Expose WatcherFront via the TargetList instead of ResourceWatcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96804
2020-11-17 11:15:35 +00:00
Julian Descottes ee9aa9e845 Bug 1676769 - [devtools] Try catch around instantiateTarget/addWatcherDataEntry in DevTools parent actors r=ochameau,nchevobbe
Depends on D97153

DevTools window actors rely on sendQuery for 2 APIs: instantiateTarget and addWatcherDataEntry.
If an exception occurs in the child actor, it will be propagated back to the parent, which will reject the sendQuery.
This can make the code revolving around those APIs very fragile. Since this code is involved in setting up the initial targets, it could be nice to catch errors there to avoid too many potential blank toolbox situations.

Differential Revision: https://phabricator.services.mozilla.com/D97155
2020-11-17 13:15:45 +00:00
Julian Descottes 34ec69f339 Bug 1676769 - [devtools] Use document.documentURI to detect print preview documents r=ochameau
DevToolsFrameChild actor excludes about:blank windows to avoid creating unnecessary targets.
In the parent process we are supposed to also exclude about:blank windows when fetching the browsing-contexts that should be debugged.
However the parent-process logic relies on checking the documentURI to exclude about:blank. The actor relies on a docShell flag called hasLoadedNonBlankURI.

The printpreview browser element uses an about:blank window, but still displays a document different from about:blank.
Consequently the parent process check considers this document as valid, because of its documentURI.
But the child actor throws because of the hasLoadedNonBlankURI flag.

This changeset adds an additional check for `window.document.documentURI` in the child actor.
Also adds a new mochitest to check that we can open the BrowserToolbox and inspect the print preview

Differential Revision: https://phabricator.services.mozilla.com/D97153
2020-11-17 13:15:24 +00:00
Ping Chen e65209a869 Bug 1577900: Add a prettyPrint button to the multiline editor of devtools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95457
2020-11-17 07:38:54 +00:00
Sylvestre Ledru c0f6fe8caf Bug 1562642 - Add missing license headers r=mhoye,marionette-reviewers,webdriver-reviewers,perftest-reviewers,tarek
Differential Revision: https://phabricator.services.mozilla.com/D97138
2020-11-17 02:06:54 +00:00
Oriol Brufau fddd41228d Bug 1552648 - Avoid too much recursion when inspecting nested promises. r=nchevobbe,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96317
2020-11-16 18:15:14 +00:00
Noemi Erli debd6a2710 Backed out 3 changesets (bug 1676808) for causing devtools failures CLOSED TREE
Backed out changeset bc9b1ba331c3 (bug 1676808)
Backed out changeset 9e26cb0f0bdf (bug 1676808)
Backed out changeset 03abab648794 (bug 1676808)
2020-11-17 01:23:53 +02:00
Alexandre Poirot 02c7de7954 Bug 1676808 - [devtools] Rename all watcher to watcherFront. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96859
2020-11-16 21:08:24 +00:00
Alexandre Poirot 1b2d2414ad Bug 1676808 - [devtools] Rename ResourceWatcher.hasWatcherSupport to hasResourceWatcherSupport. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D97148
2020-11-16 21:08:21 +00:00
Alexandre Poirot b1bb3196f3 Bug 1676808 - [devtools] Expose WatcherFront via the TargetList instead of ResourceWatcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D96804
2020-11-16 21:08:19 +00:00
Nika Layzell 42028efc71 Bug 1671983 - Part 4: Stop awaiting BrowserTestUtils.loadURI, r=annyG,remote-protocol-reviewers,extension-reviewers,preferences-reviewers,whimboo,zombie
This method only is async in order to allow callers to wait for a process switch
triggered by the call to `loadURI` to be finished before resolving. With
DocumentChannel, we should never trigger a process switch eagerly like this
again, so we don't need any of the async behaviour here anymore.

This part is largely mechanical changes to tests, removing the `await` calls on
`loadURI`, and a follow-up part will remove the actual async logic from
`BrowserTestUtils.loadURI`.

Differential Revision: https://phabricator.services.mozilla.com/D94641
2020-11-12 18:01:03 +00:00
Nicolas Chevobbe 41e5dcf390 Bug 1673226 - [devtools] Load missing ObjectInspector-related CSS files in inspector. r=rcaliman.
The ObjectInspector might be used in the inspector by extension
using the setExpression API. When we moved reps to a dedicated
folder and split it so it does not contain objectInspector bits
anymore (in Bug 1669956), we forgot to include Tree.css and ObjectInspector.css
in the inspector panel, resulting in weird styling for the side panel.
This patch includes the missing CSS files, which fixes the issue.

Differential Revision: https://phabricator.services.mozilla.com/D97126
2020-11-16 14:14:47 +00:00
Julian Descottes 4c52379c29 Bug 1676646 - [devtools] Remove unused Connected localized string in aboutdebugging r=ladybenko,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96714
2020-11-16 09:34:00 +00:00
Karl Tomlinson 332494e855 Bug 1213512 remove unused NS_ERROR_DOM_FILE_ABORT_ERR r=baku
Depends on D95967

Differential Revision: https://phabricator.services.mozilla.com/D95968
2020-11-13 07:55:31 +00:00
Nicolas Chevobbe 68d3b8b92b Bug 1672980 - [devtools] Fix browser_browser_resources_console_messages failures on beta simulation. r=ochameau.
This is flipping the devtools.browsertoolbox.fission pref, which
is only enabled on Nightly at the moment.

Differential Revision: https://phabricator.services.mozilla.com/D96411
2020-11-11 09:05:01 +00:00
Hubert Boma Manilla a70ec38159 Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-13 15:17:48 +00:00
Julian Descottes e7ec1ff308 Bug 1676980 - [devtools] Remove unused protocol/utils describeTemplate() helper r=ochameau
Depends on D96935

Differential Revision: https://phabricator.services.mozilla.com/D96939
2020-11-13 10:21:36 +00:00
Julian Descottes 3ad6fe2ca8 Bug 1676974 - [devtools] Remove unused protocol/utils.js method() helper r=ochameau
Current implementation
```lang=javascript
exports.method = function(fn, spec = {}) {
  fn._methodSpec = Object.freeze(spec);
  if (spec.request) {
    Object.freeze(spec.request);
  }
  if (spec.response) {
    Object.freeze(spec.response);
  }
  return fn;
};
```
https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/utils.js#70-79

The helper method() in protocol/utils.js is only called from two methods:
- actorBridge (never used in the codebase)
- actorBridgeWithSpec (used by a few actors)

actorBridgeWithSpec doesn't pass the second argument, so in practice, this method could be reduced to:
```lang=javascript
exports.method = function(fn) {
  fn._methodSpec = Object.freeze({});
  return fn;
};
```

`_methodSpec` is only mentioned in one other spot: https://searchfox.org/mozilla-central/rev/5a1a34953a26117f3be1a00db20c8bbdc03273d6/devtools/shared/protocol/Actor/generateActorSpec.js#27-40

But based on our coverage tooling, we never actually have a `_methodSpec` when we run this code: https://coverage.moz.tools/#view=file&revision=latest&path=devtools/shared/protocol/Actor/generateActorSpec.js

To hit it, we would have to call `generateActorSpec` directly with an actor where we used `actorBridgeWithSpec`. But we never do that, we only use it with plain JS objects in the devtools/shared/specs folder.

Consequently, this helper can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D96935
2020-11-13 09:49:53 +00:00
Bogdan Tara 3667467db8 Backed out 10 changesets (bug 1662254) for lint failure on generate_static_pref_list.py CLOSED TREE
Backed out changeset 972e63387191 (bug 1662254)
Backed out changeset 3a9d6f0aa380 (bug 1662254)
Backed out changeset 4b3ffe7fe1af (bug 1662254)
Backed out changeset 4834b1025611 (bug 1662254)
Backed out changeset ec1f7afe8a2d (bug 1662254)
Backed out changeset c7a6b927b1de (bug 1662254)
Backed out changeset 2427d85b2605 (bug 1662254)
Backed out changeset 979bf4ac97bb (bug 1662254)
Backed out changeset 3e443333c636 (bug 1662254)
Backed out changeset a5261578ebfc (bug 1662254)
2020-11-12 23:59:07 +02:00
Steve Fink 9ab0a6a530 Bug 1662254 - Rename CC_WAITING -> CC_FINISHED r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D94792
2020-11-12 19:05:32 +00:00
Julian Descottes 2a85b4f393 Bug 1650963 - [devtools] Set non-fission flag when opening DevTools window from a non-fission host tab r=Honza
We cannot use swapFrameLoaders between a fission and a non fission window. We should make sure to open non-fission windows if the current host is not a fission one.

Differential Revision: https://phabricator.services.mozilla.com/D96696
2020-11-12 15:18:43 +00:00
Cody Welsh 049cc3d149 Bug 1673932 - [devtools] - Combine `register` calls in highlighters. r=jdescottes
Combine the calls to the highlighter `register()` function in a loop.
One of several possible solutions here.

Differential Revision: https://phabricator.services.mozilla.com/D96302
2020-11-12 08:38:59 +00:00
Cody Welsh efbcf065d3 Bug 1673932 - [devtools] - Use absolute paths in highlighters register helper. r=jdescottes
Change the logic in the devtools/server/actors/highlighters.js file to
use absolute paths instead of constructing them from an internal helper
function. Also modify the calls to `register` at the bottom of the file
according to this change.

Differential Revision: https://phabricator.services.mozilla.com/D96301
2020-11-10 10:12:53 +00:00
Tim Huang 7ec26df273 Bug 1641270 - Part 6: Pass CookieJarSettings to nsIWebBrowserPersist.saveURI() and nsIWebBrowserPersist.savePrivacyAwareURI(). r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D95616
2020-11-11 18:19:27 +00:00
Andreea Pavel 51f16bb9d2 Backed out changeset 62af829812bd (bug 1662736) for permafailing bug 1676641 and bug 1655183 on a CLOSED TREE 2020-11-11 19:53:14 +02:00
Hubert Boma Manilla d4cec11d5a Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-11 10:51:28 +00:00
Julian Descottes 2e535d26d6 Bug 1669666 - [devtools] Ignore custom pageshow/pagehide events in BrowsingContextTargetActor r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D96605
2020-11-11 09:51:11 +00:00
Dan Minor 57441aa8cc Bug 1673054 - Migrate uses of intl.uidirection to intl.l10n.pseudo; r=Gijs,zbraniecki
This also removes pref overrides from methods like LocaleService::IsLocaleRTL or
IntlService.getLocaleInfo, because it doesn't really make sense to override the
result of checking an arbitrary locale, the relevant use case is overriding the
result for the current app locale.

Removal of the intl.uidirection pref completely will be done in a separate bug.

Differential Revision: https://phabricator.services.mozilla.com/D96235
2020-11-09 15:33:39 +00:00
Kris Maglione cfebcd3fd2 Bug 1669961: Return null from `.contentWindow` when inner window is inactive. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D93853
2020-11-10 20:35:04 +00:00
Kris Maglione 7ae9faa46f Bug 1651774: Update mozilla/use-services rule for native Services implementation. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D93858
2020-11-06 18:58:33 +00:00
Nicolas Chevobbe 6abc8ae401 Bug 1634208 - [devtools] Fix browser_jsterm_screenshot_command_warnings intermittent. r=ladybenko.
It looks like the test was hitting the timeout limit on slow hardware (e.g. on
linux ccov on TRY).
Requesting a longer timeout seems to fix the failure.

Differential Revision: https://phabricator.services.mozilla.com/D96405
2020-11-10 16:07:32 +00:00
Steven MacLeod 971103bdd5 Bug 1606061 - move TouchEventsOverride to BrowsingContext. r=farre,devtools-backward-compat-reviewers
This change removes docshell's `mTouchEventsOverride` and replaces it
with a new `BrowsingContext` field `TouchEventsOverrideInternal`.
All uses of the old field have been replaced and an override should
now work under fission when there are cross-origin descendent frames.

Differential Revision: https://phabricator.services.mozilla.com/D96414
2020-11-10 15:57:30 +00:00
Nicolas Chevobbe 56c8e9380a Bug 1667778 - [devtools] Remove mentions of launchpad in debugger. r=jdescottes.
This removes the few mentions of the launchpad that were
still existing in the debugger codebase.
We take this as an opportunity to use the #mount element
as the root of the React app (instead of creating a new
div for it).

Depends on D96384

Differential Revision: https://phabricator.services.mozilla.com/D96513
2020-11-10 13:05:24 +00:00
Nicolas Chevobbe 514b0ddad4 Bug 1675769 - [devtools] Move devtools-environment function into debugger/src. r=bomsy.
This moves the `isNode` and `isNodeTest` functions to the debugger/src/utils folder,
updates the callsites to those functions, generates the bundles, and finally,
removes the devtools-environment folder, as well as all mentions of it.

Differential Revision: https://phabricator.services.mozilla.com/D96384
2020-11-10 15:18:32 +00:00
Nicolas Chevobbe 6e6be10526 Bug 1675769 - [devtools] Remove usage of devtools-environment isTesting. r=bomsy.
When possible, we switch to the plain devtools/shared/flags module.
In some cases, the check was only done for jest test, so we use
isNodeTest instead.

Differential Revision: https://phabricator.services.mozilla.com/D96382
2020-11-10 15:14:07 +00:00
Nicolas Chevobbe 9725148bcb Bug 1675769 - [devtools] Clean-up devtools-environment usage. r=bomsy.
Differential Revision: https://phabricator.services.mozilla.com/D96381
2020-11-10 15:07:57 +00:00
smolnar ec58e559fc Backed out changeset 1780d41127e8 (bug 1662736) for causing devtools failure. CLOSED TREE 2020-11-10 15:07:27 +02:00
Andrey Bienkowski e5944c6972 Bug 1674841 - [devtools] Clean up devtools/shared/protocol/tests/xpcshell/test_protocol_async.js r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95553
2020-11-10 12:55:29 +00:00
Nicolas Chevobbe 858da426e6 Bug 1674400 - [devtools] Update pretty-fast to 0.2.4. r=bomsy.
This updates the pretty-fast module to bring the commits
that were done there the 3 last years (date of the last
version being published).

Differential Revision: https://phabricator.services.mozilla.com/D96176
2020-11-10 12:15:13 +00:00
Hubert Boma Manilla 5c91d1f55c Bug 1662736 - [devtools] Simplify the network request payload r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94457
2020-11-10 12:44:23 +00:00
Yura Zenevich 21c81dd7e6 Bug 1675539 - add telemetry for tabbing order overlay activation. r=jdescottes,janerik
Differential Revision: https://phabricator.services.mozilla.com/D96091
2020-11-09 16:19:20 +00:00
Alexandre Poirot efdfcfb399 Bug 1672826 - [devtools] Unmanage fronts when we purge a whole prefix. r=nchevobbe
Previous `purgeRequestForDestroy` method was only rejecting all pending requests.
The new `syncFrontDestroy` allows to fully destroy the front, including
unregistering it/unmanage it. So that if we receive a packet from a brand new
actor, with the same prefix and actor ID, DevToolsClient.getFront doesn't return
the old destroyed front.
This issue was making pending requests that were never resolved.

Differential Revision: https://phabricator.services.mozilla.com/D94718
2020-11-09 12:29:53 +00:00
Alexandre Poirot 8e2267f855 Bug 1672826 - [devtools] Close ChildDebuggerTransport in the parent process when we destroy content process targets. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D94485
2020-11-09 12:26:41 +00:00