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

4400 Коммитов

Автор SHA1 Сообщение Дата
Nicolas Chevobbe 81536061a5 Bug 1680202 - [devtools] Remove storageInspector traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98443
2020-12-08 10:55:21 +00:00
Nicolas Chevobbe 7f12163d9d Bug 1680202 - [devtools] Remove heapSnaphots traits on Root actor. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D98442
2020-12-08 10:55:13 +00:00
Nicolas Chevobbe eee9299520 Bug 1678757 - [devtools] Add missing errors in Error previewer. r=bomsy.
We weren't handling the error exception object in the Error previewer for
some error classes, and as a result we'd show an undefined grip in the console,
instead of a proper error message.
A test is added to check that we do print wasm errors as expected.

Differential Revision: https://phabricator.services.mozilla.com/D98469
2020-12-03 17:16:25 +00:00
Nicolas Chevobbe 5b0ec6d578 Bug 1680207 - [devtools] Remove unnecessary backward compatibility comment in ObjectActor. r=bomsy.
Depends on D98448

Differential Revision: https://phabricator.services.mozilla.com/D98449
2020-12-03 09:18:56 +00:00
Nicolas Chevobbe 460c8c2214 Bug 1680281 - [devtools] Update backward compatibility comments for WatcherActor traits. r=jdescottes.
Those traits are going to be removed in Bug 1680280,
and not through the regular backward-compatibility cleanup routine.

Differential Revision: https://phabricator.services.mozilla.com/D98483
2020-12-02 18:42:47 +00:00
Julian Descottes a0e3b72bea Bug 1673897 - [devtools] Stop using arrays as return values for rdp responses r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D96940
2020-12-02 14:35:46 +00:00
Hubert Boma Manilla 0b6ab1ef69 Bug 1676177 - [devtools] Throtting requests in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97965
2020-11-30 23:03:55 +00:00
Nicolas Chevobbe 32aaf870e6 Bug 1677942 - [devtools] Use new syntax for backward compatibility comments. r=jdescottes,devtools-backward-compat-reviewers.
This turns all existing backward compatibility comments (or
comments mentioning a specific Firefox version), into the new
syntax we agreed upon in Bug 1673535.

Differential Revision: https://phabricator.services.mozilla.com/D97395
2020-12-01 10:27:47 +00:00
Nicolas Chevobbe 453481a6fe Bug 1678636 - [devtools] Prevent paused overlay to be shown after resuming. r=ladybenko.
Before showing the pause overlay, we wait for the page to be fully loaded.
This introduced some delay, and at the moment we were showing the overlay, the
debugger could not be paused anymore.
This patch adds another check to ensure the debugger is paused, as well as a
test to avoid regression."

Differential Revision: https://phabricator.services.mozilla.com/D97778
2020-12-01 09:17:17 +00:00
Nicolas Chevobbe 41f54d06bf Bug 1678638 - [devtools] Remove unused node parameter from PausedDebuggerOverlay#show. r=ladybenko.
This was probably here to match other highlighters, but
we're not using it at all so let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D97777
2020-12-01 09:17:09 +00:00
Oriol Brufau 50f32274b5 Bug 1678613 - Use property descriptors in promise previewers. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D97760
2020-11-27 15:53:55 +00:00
Fabien CASTERS 59aee01268 Bug 1676629 - Remove defer usage in devtools/server/actors/storage.js r=Honza,ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D96712
2020-11-26 14:35:28 +00:00
Nicolas Chevobbe 00e272dd2d Bug 1678258 - [devtools] Fix debugger paused overlay buttons. r=rcaliman.
In Bug 1673328, the signature of the resume function was modified,
but we missed that the function was called from the paused overlay,
which means we didn't pass the correct signature anymore, and buttons
of the paused overlay weren't working at all.
This patch fixes the callsite and adds a mochitest where we go
through a simple case of pausing and then stepping and resuming
by clicking on the overlay buttons.
Since the pause overlay is different from the other highlighters
for which we already had test helpers, we needed to add dedicated
test helpers for the pause overlay, in the test actor.

Differential Revision: https://phabricator.services.mozilla.com/D97757
2020-11-26 15:06:06 +00:00
Hubert Boma Manilla cee5bf40eb Bug 1662736 - [devtools] Simplify the network resource payload for the server watcher r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94720
2020-11-20 16:17:36 +00:00
Oriol Brufau 18fa52a577 Bug 1676476 - Replace grip.promiseState with a preview. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D97340
2020-11-19 21:51:56 +00:00
Zac Svoboda 52e80c2e61 Bug 1623250 - Correct :visited invalid property tooltip r=ladybenko,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D96487
2020-11-17 16:40:15 +00:00
Nicolas Chevobbe 7bd6a81b4f Bug 1677379 - [devtools] Fix Learn more link on CORS warning message. r=ckerschb.
In Bug 1575068, the message of CORSMissingAllowHeaderFromPreflight and CORSPreflightDidNotSucceed
changed, and the category field was updated in the nsIErrorMessage. As a result, the keys in
errordocs.js needed to be changed, which was rightfully done, but the value was changed as well,
which means the resulting url of the Learn more links were modified as well. I'm not sure if
something changed since then, but those 2 urls now lead to 404 pages on MDN.
This patch fixes those URLs to ensure we do link to the right MDN pages.

Differential Revision: https://phabricator.services.mozilla.com/D97129
2020-11-19 10:41:35 +00:00
Micah Tigley f9418e8f58 Bug 1677660 - Remove backwards-compat methods from Compatibility front. r=jdescottes,daisuke,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D97248
2020-11-18 16:29:31 +00:00
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
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
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
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
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
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
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
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
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
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
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
Andrey Bienkowski e86e7489c7 Bug 1674425 - [devtools] Remove defer usage in server/tests/browser/browser_perf-realtime-markers.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D95337
2020-11-09 11:42:38 +00:00
Nicolas Chevobbe 3da665e7b3 Bug 1674115 - [devtools] Fix crash caused by calling WorkerDebugger.setDebuggerReady. r=ochameau.
We were trying to resume the worker debugger in case we
couldn't connect to the worker. Since connectToWorker can
reject when the worker is closed, we might try to resume a
closed worker, which could cause a crash.
In this patch, we simply check if the worker debugger isn't closed
before resuming it.

Differential Revision: https://phabricator.services.mozilla.com/D95990
2020-11-09 10:03:41 +00:00
Nicolas Chevobbe 220bf52237 Bug 1675450 - [devtools] Remove unused ObjectActor.definitionSite. r=ochameau,devtools-backward-compat-reviewers.
The function wasn't used, except in a test that this patch removes.
Since it was also the only use of the getSourcesManager hook, we're able to
remove it as well.

Differential Revision: https://phabricator.services.mozilla.com/D95989
2020-11-09 09:50:26 +00:00
Alexandre Poirot 48133a28a8 Bug 1673627 - [devtools] Force showing iframe content instead of inline content for remote frames. r=jdescottes
For some reason we return an inlineTextChild when the iframe is remote, so only with fission turned on.
When the iframe isn't remote, WalkerFront.inlineTextChild returns undefined.

Differential Revision: https://phabricator.services.mozilla.com/D95868
2020-11-09 08:43:28 +00:00
Nick Alexander b143efdd25 Bug 1675332 - Make `--headless --jsdebugger` launch a headed Browser Toolbox. r=emalysz
Before this commit, the `MOZ_HEADLESS` environment variable was set by
the `--headless` process and inherited by the launched Browser Toolbox
process, hiding the debugger UI.  This commit allows to launch the JS
debugger when running under `--headless` by explicitly removing the
`MOZ_HEADLESS` variable from the environment.  To do this, a small
tweak to `Subprocess.jsm` is used that allows `null` to signal
"removal", distinct from `undefined` for "ignored".

While here I prefixed the output from the launched Browser Toolbox
process, which helps visually distinguish warnings, etc; and I also
corrected a typo that I stumbled across.

Differential Revision: https://phabricator.services.mozilla.com/D95897
2020-11-06 04:53:24 +00:00
Belén Albeza a6367adcc2 Bug 1673821 - [devtools] Fix error when closing storage panel r=jdescottes
Introduce a guard in the actor's destructor, so it does not fail if called more than once.

Differential Revision: https://phabricator.services.mozilla.com/D96068
2020-11-06 14:12:55 +00:00
Neil Deakin c5eff66205 Bug 1649843, remove now unused legacy actor code, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D95206
2020-11-06 15:46:11 +00:00
Julian Descottes d6d8ea296d Bug 1654763 - [devtools] Remove implementation, tests and documentation for actorHasMethod r=rcaliman,ochameau,devtools-backward-compat-reviewers
actorhasMethod had several technical limitations making it hard to use consistently. We now removed all the call sites for this method. This changeset removes the method and all its dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D95861
2020-11-06 13:50:52 +00:00
Nicolas Chevobbe 4bad3995de Bug 1592584 - [devtools] Accept worker targets in console. r=ochameau.
The `dom.worker.console.dispatch_events_to_main_thread` pref is used by platform
code to check if console API messages in the worker thread should be dispatched
to the main thread. If so, the message parameters are cloned, or stringified if
they can't be. This is currently the default behavior.

The pref is checked on the server side and added as a trait to the root actor.
On the client, if the pref isn't true, then we accept messages coming from
worker targets in the console. We can't accept them without condition, otherwise
we would get duplicated message (from the main thread AND the worker thread).

The browser_webconsole_console_logging_workers_api.js test is repurposed for
worker logging since it was disabled on e10s anyway. We add a few test case
to check we can get cached and live message, and that non-clonable object, like
worker scope, are displayed like regular objects when the pref is false.

Differential Revision: https://phabricator.services.mozilla.com/D85397
2020-11-05 10:17:36 +00:00
Nicolas Chevobbe 4269e69069 Bug 1674417 - [devtools] Rename SourcesManager instances. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D95333
2020-11-05 08:54:54 +00:00
Eitan Isaacson f42d5e8b3d Bug 1672694 - P1: Query layout for selectable text state. r=morgan,Jamie,yzen
The SELECTABLE_TEXT state is currently under-utilized and probably wrong, since it simply relies on testing if a hypertext has any text. A more correct reflection of the state should be taken from layout's IsSelectable method.

Note, even if an element is styled `user-select: none`, the text will still be keyboard selectable if it is editable (eg. input or contenteditable), so we should consider that SELECTABLE_TEXT.

Differential Revision: https://phabricator.services.mozilla.com/D95783
2020-11-04 19:56:55 +00:00
Julian Descottes 4952a99950 Bug 1674977 - [devtools] Always return true from gDevTools::isFissionContentToolboxEnabled r=ochameau
Depends on D95685

Keep the isFissionContentToolboxEnabled method but always return true to effectively enable all fission related behavior for all content toolboxes.

Differential Revision: https://phabricator.services.mozilla.com/D95686
2020-11-04 14:33:37 +00:00
Alexandre Poirot 613fcbb932 Bug 1675256 - [devtools] Remove discardRequestBody and discardResponseBody attributes of NETWORK_EVENT resource. r=bomsy,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D95846
2020-11-04 17:14:03 +00:00
Yura Zenevich c7aaa8e041 Bug 1654956 - add UI for displaying tabbing order overlay in the accessibility panel. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94926
2020-11-03 15:33:16 +00:00
Yura Zenevich ba825c5746 Bug 1654956 - add AccessibleWalker functionality to show/hide tabbing order overlay. r=jdescottes,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94925
2020-11-03 15:33:09 +00:00
Yura Zenevich e669493035 Bug 1654956 - adding TabbingOrderHighlighter that highlights a sequence of nodes within the tabbing order. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94924
2020-11-03 15:33:01 +00:00
Yura Zenevich 265472b1e2 Bug 1654956 - adding NodeTabbingOrderHighlighter highlighter to highlight nodes that are in the tabbing order for a particular target. r=jdescottes,rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D94923
2020-11-03 15:32:53 +00:00
Razvan Maries 10425eddfc Backed out 7 changesets (bug 1658084, bug 1671983) for perma failures on browser_async_remove_tab.js and browser_e10s_chrome_process.js. CLOSED TREE
Backed out changeset 2e6309c1cdbd (bug 1658084)
Backed out changeset 99aafd9304ef (bug 1671983)
Backed out changeset 80280b85280a (bug 1671983)
Backed out changeset 008db2659002 (bug 1671983)
Backed out changeset 32bd45c7fe3a (bug 1671983)
Backed out changeset 56e227e6580c (bug 1671983)
Backed out changeset a404f809f79d (bug 1671983)
2020-11-04 04:23:47 +02:00
Nika Layzell 5f9c85da95 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-04 00:55:36 +00:00
Julian Descottes 3ad5aa0547 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule specs to individual files r=daisuke,devtools-backward-compat-reviewers
Depends on D95328

Differential Revision: https://phabricator.services.mozilla.com/D95329
2020-11-03 15:56:12 +00:00
Julian Descottes bcd5dded83 Bug 1674405 - [devtools] Extract StyleSheet, StyleSheets and MediaRule actors to individual files r=daisuke
Depends on D95299

The actors/stylesheets.js file contained three actors.
This change moves each actor in its own file.

Differential Revision: https://phabricator.services.mozilla.com/D95328
2020-11-02 18:42:53 +00:00
Julian Descottes 3def563fd2 Bug 1674371 - [devtools] Move ELEMENT_STYLE constant to a single file r=rcaliman,devtools-backward-compat-reviewers
Depends on D95299

Differential Revision: https://phabricator.services.mozilla.com/D95307
2020-11-02 18:45:03 +00:00
Julian Descottes 6094cf8dcb Bug 1674362 - [devtools] Extract PageStyle and StyleRule specs to individual files r=rcaliman,devtools-backward-compat-reviewers
Depends on D95297

After moving actors to individual files, we should also do the same with specs.
Both actors are using shared types, which are moved to a shared types file.

Differential Revision: https://phabricator.services.mozilla.com/D95298
2020-11-02 18:35:28 +00:00
Julian Descottes 51323f232a Bug 1674362 - [devtools] Extract PageStyle and StyleRule actors to individual files r=rcaliman
The actors/styles.js file contained two actors.
This change moves each actor in its own file.
A shared actors/utils/style-utils file is also created to host shared helpers.

Differential Revision: https://phabricator.services.mozilla.com/D95297
2020-11-02 17:14:55 +00:00
Belén Albeza 65ade5bf66 Bug 1669509 - [devtools] Hide internal indexedDB's when we are not in the browser toolbox r=ochameau
In https://phabricator.services.mozilla.com/D91122#C3084925OL296 we transferred the filtering of indexedDB dbs to a transformer, but it was not being applied since the `hosts` getter was still used by the client. Since we discussed this filtering should be done in the server, this patch moves the filtering to the storage actor instead.

Differential Revision: https://phabricator.services.mozilla.com/D95020
2020-11-02 13:28:56 +00:00
Belén Albeza 6ce63ec0cd Bug 1666528 - [devtools] Add session storage resource + test r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94728
2020-10-30 16:12:58 +00:00
Csoregi Natalia c9031b88f2 Backed out changeset 5a4c2dc63d04 (bug 1669509) for causing leaks. CLOSED TREE 2020-10-30 18:50:11 +02:00
Belén Albeza a2eed98a2c Bug 1669509 - [devtools] Hide internal indexedDB's when we are not in the browser toolbox r=ochameau
In https://phabricator.services.mozilla.com/D91122#C3084925OL296 we transferred the filtering of indexedDB dbs to a transformer, but it was not being applied since the `hosts` getter was still used by the client. Since we discussed this filtering should be done in the server, this patch moves the filtering to the storage actor instead.

Differential Revision: https://phabricator.services.mozilla.com/D95020
2020-10-30 13:33:47 +00:00
Alexandre Poirot 1cca051c93 Bug 1673328 - [devtools] Stop using requestTypes in ThreadActor. r=nchevobbe
This was hacking the internals of RDP/protocol.js in order to provide
different names to the actor prototype.
I had to rename existing `skipBreakpoints` getter in order to avoid
name collision with the RDP method of the same name.
I also had to tweak a few method arguments as they weren't following protocol.js spec.
They were called without protocol.js automatic marshalling of values.
Finally, hack something in protocol.js in order to avoid duplicated response for ThreadActor.attach.

Differential Revision: https://phabricator.services.mozilla.com/D94958
2020-10-29 18:58:33 +00:00
Alexandre Poirot ce474dc715 Bug 1673328 - [devtools] Rename TabSources to SourcesManager. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D95042
2020-10-29 19:00:26 +00:00
Alexandre Poirot 90a993e0b7 Bug 1673328 - [devtools] Drop ThreadActor.exit in favor of destroy. r=nchevobbe
We no longer need to manuall call threadActor.exit from Target Actors
as the ThreadActor is managed by the Target Actors, so that managed children
will be destroyed when the target actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D94957
2020-10-29 18:59:35 +00:00
Alexandre Poirot fdb8f8c40d Bug 1673328 - [devtools] Drop unused ThreadActor.detach method. r=nchevobbe,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94956
2020-10-29 19:00:39 +00:00
Alexandre Poirot e5dd1d7904 Bug 1671906 - [devtools] Introduce a target actor mixin in order to share common code between all targets. r=jdescottes
Similarly to the frontend, I'm introducing a mixin in order to share code between at target actors.
We might be able to share more, like sources. But at least we share new addition related to watcher and resources.
This would probably have been easier if Actor were using ES Classes.

Differential Revision: https://phabricator.services.mozilla.com/D94948
2020-10-29 16:46:20 +00:00
Hubert Boma Manilla f2eff26a41 Bug 1667370 - [devtools] Implement network request blocking in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94449
2020-10-28 22:32:14 +00:00
Daisuke Akatsuka 473676fda0 Bug 1664941: Connect style actor and stylesheet watcher. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D90651
2020-10-29 06:26:20 +00:00
Cosmin Sabou 7a1d8770ac Backed out changeset 3b72cf9476d8 (bug 1667370) for xpc failures on test_protocol_index.js. CLOSED TREE 2020-10-28 23:35:36 +02:00
Hubert Boma Manilla 3d18cd113c Bug 1667370 - [devtools] Implement network request blocking in fission r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D94449
2020-10-28 20:46:13 +00:00
Julian Descottes b5906333d9 Bug 1654998 - [devtools] Remove backward compatibility code from storage-ui::_readSupportsTraits r=ladybenko
Traits support was added to the storage actor in FF80.
Firefox release is now FF81 so we can cleanup the related backward compatibility code.

Differential Revision: https://phabricator.services.mozilla.com/D93081
2020-10-28 20:19:06 +00:00
Nicolas Chevobbe f24966129e Bug 1673550 - [devtools] Destroy the thread actor when the worker target actor is destroyed. r=ochameau.
We have to manually call `ThreadActor#exit` as calling `destroy` won't completely
destroy it, since it does not call `Actor#destroy`, whereas `ThreadActor#exit` does.

Differential Revision: https://phabricator.services.mozilla.com/D94835
2020-10-27 15:10:46 +00:00
Neil Deakin 46d6cc2f05 Bug 1672390, remove message manager use from browser_connectToFrame.js, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94667
2020-10-27 00:26:35 +00:00
Neil Deakin 42167e0a0f Bug 1672390, remove message manager and frame scripts from devtools/client/performance, r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D94388
2020-10-27 00:26:14 +00:00
Fabien CASTERS 054244e95b Bug 1672433 - Remove backward compatibility method getDescription from devtools/client/fronts/device.js r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94731
2020-10-26 20:20:57 +00:00
Ricky Stewart 02a7b4ebdf Bug 1654103: Standardize on Black for Python code in `mozilla-central`.
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-26 18:34:53 +00:00
Nicolas Chevobbe edca74234a Bug 1633712 - [devtools] Create WorkerTargets as soon as possible. r=ochameau,devtools-backward-compat-reviewers.
This patch adds support for dedicated worker targets in the Watcher actor.
Shared and Service workers are not handled yet.

In a similar manner to what we already have for frame targets, we add a worker-helper
file that will communicate with a JsWindowActor pair spawned on each document,
that will  manage workers (DevToolsWorkerParent/DevToolsWorkerChild).

For a given document, the DevToolsWorkerChild will enumerate the existing workers
related to it, as well as add an event listener to be notified when workers are
being registered and unregistered, and communicate that back to the DevToolsWorkerParent
on the main thread, so worker targets creation and destruction are notified by
the Watcher actor (via target-available-form and target-destroyed-form events).

When a worker is created, the DevToolsWorkerChild for the document the worker
was spawned from will create a WorkerTargetActor, that will live in the worker
thread (using worker-connector.js), passing it resources the Watcher is currently
listening for. It will also handle communication between the main thread and the
worker thread, when the watcher listen to new resources (or stop watching resources).

A WorkerTargetFront is created so the client can be notified about available
resources (via the resource-available-form event, emitted from the worker target).

Tests are added in the next patches of this queue.

Differential Revision: https://phabricator.services.mozilla.com/D85399
2020-10-26 12:53:43 +00:00
Nicolas Chevobbe 268a9bef36 Bug 1633712 - [devtools] Move shouldNotifyWindowGlobal and getAllRemoteBrowsingContexts to a util file. r=ochameau.
These functions will be used by the worker-helper.js module as well.

Differential Revision: https://phabricator.services.mozilla.com/D92751
2020-10-26 12:52:26 +00:00
Alexandre Poirot ecca7cad66 Bug 1672778 - [devtools] Avoid trying to send new-source event if the thread actor has been destroyed. r=nchevobbe
This may prevent logging a few exception or error messages.
But thanks to the other patch of this bug, we should try to stop listening
for sources as soon as the thread actor is destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D94484
2020-10-23 10:24:57 +00:00
Alexandre Poirot 2839b0697a Bug 1672778 - [devtools] Destroy the thread actor when the content process actor is destroyed. r=nchevobbe
We have to manually call `exit` as calling `destroy` won't completely destroy it.
ThreadActor.destroy do not call protocoljs.Actor.destroy, ThreadActor.exit does it.

Differential Revision: https://phabricator.services.mozilla.com/D94483
2020-10-26 11:00:05 +00:00
Bogdan Tara da1098d4aa Backed out 10 changesets (bug 1654103, bug 1672023, bug 1518999) for PanZoomControllerTest.touchEventForResult gv-junit failures CLOSED TREE
Backed out changeset ff3fb0b4a512 (bug 1672023)
Backed out changeset e7834b600201 (bug 1654103)
Backed out changeset 807893ca8069 (bug 1518999)
Backed out changeset 13e6b92440e9 (bug 1518999)
Backed out changeset 8b2ac5a6c98a (bug 1518999)
Backed out changeset 575748295752 (bug 1518999)
Backed out changeset 65f07ce7b39b (bug 1518999)
Backed out changeset 4bb80556158d (bug 1518999)
Backed out changeset 8ac8461d7bd7 (bug 1518999)
Backed out changeset e8ba13ee17f5 (bug 1518999)
2020-10-24 03:36:18 +03:00
Ricky Stewart c0cea3b0fa Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.

5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-23 20:40:42 +00:00
Belén Albeza e6d07a37fa Bug 1666519 - Part 1: [devtools] Add localStorage resource r=ochameau
Tests are added in the next revision of the stack: D93808

Differential Revision: https://phabricator.services.mozilla.com/D92634
2020-10-23 11:58:45 +00:00
Ben Delevingne 4c645f7aaa Bug 1672364 - remove defer from devtools/server. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D94296
2020-10-23 10:56:00 +00:00
Razvan Caliman 7feae1e668 Bug 1623667 - [devtools] Update CustomHighlighterActor comments and docs r=ochameau
Depends on D92220

Rephrasing of code comments and cleanup of documentation to reflect that `CustomHighlighterActor` is now the only actor which deals with highlighting stuff after removing `HighlighterActor` in D92220. No functionality is changed in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D92221
2020-10-20 14:43:20 +00:00
Razvan Caliman 8dacfff4f6 Bug 1623667 - [devtools] Remove HighlighterActor r=ochameau,devtools-backward-compat-reviewers
This patch completely removes the `HighlighterActor` and its accessors.

The rest of the patches in this commit series update the consumers and tests to use the new highlighter manager added to `HighlightersOverlay` in D81526. [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) updated all consumers within the **Inspector** panel to use this approach. Now, we're updating the rest of the consumers outside the Inspector.

### Why remove HighlighterActor?

The changes introduced in D81526 for [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) make it possible to  highlight nodes using the `CustomHighligtherActor` with the **Box Model Highlighter** implementation.

The `HighlighterActor` was itself a wrapper around **Box Model Highlighter** and Simple Outline Highlighter, and exposed node picking functionality. Simple Outline Highlighter was removed with [Bug 1650094](https://bugzilla.mozilla.org/show_bug.cgi?id=1650094). The node picking functionality was decoupled from `HighlighterActor`in [Bug 1607756](https://bugzilla.mozilla.org/show_bug.cgi?id=1607756).

After those changes, `HighlighterActor` is no longer special. It can be removed in favor of a single generic actor, `CustomHighligtherActor`, with the Box Model Highlighter implementation.

Differential Revision: https://phabricator.services.mozilla.com/D92220
2020-10-20 14:43:23 +00:00
Alexandre Poirot 8458fea935 Bug 1672660 - [devtools] Unregister docshell listeners only if we had time to register them. r=nchevobbe
It looks like we are destroying the target actor immediately, without having time
to call _watchDocshells. And given that removeObserver throws if there is no matching listener
already registered, it prevent detaching the target correctly, and, introduces a leak.

Differential Revision: https://phabricator.services.mozilla.com/D94452
2020-10-22 20:13:28 +00:00
Alexandre Poirot fe4803309b Bug 1620248 - [devtools] Rename content-process.jsm init method to initContentProcessTarget. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D94373
2020-10-22 10:02:47 +00:00
Alexandre Poirot 8cfdbef9f5 Bug 1620248 - [devtools] Create ContentProcessTarget from the server side via the Watcher Actor. r=nchevobbe,jdescottes
Before, targets were created on-demand, from the frontend, by calling ProcessDescriptor.getTarget
when the root actor informed the frontend of a creation of a content process via processListChanged event
and the notification of a new ProcessDescriptor.
This previous behavior was making so that the target actor was created very late and did not allow
recording for resources (console messages for ex), nor setting breakpoints very early during the process startup.

With this new implementation, the watcher actor allows knowing if the frontend cares about content process target or not.
We should only create these targets if the browser toolbox is opened, and typically not if we are only debugging a tab via a regular web toolbox.
We do that via WatcherActor.watchTarget and sharedData object.
content-process-script.js is loaded in all processes. Process script are loaded quite early during process startup.
Soonish after `sharedData` is passed to the content process.
So that it is hopefully executed before most privileged javascript runs.
Javascript code where we possibly want to debug/observe/set a breakpoint on.
This setup allows us to create the Content Process Target actor much earlier than the previous setup.
When created, the target actor immediately start listening for resources (console message and others) via its `addWatcherDataEntry` method.
In a near future, breakpoints will also be set via this method.

We should also followup to use something else than Process Script and sharedData
in order to create the target earlier, before any JS runs.

Differential Revision: https://phabricator.services.mozilla.com/D65529
2020-10-22 10:02:42 +00:00
Alexandre Poirot 23e54f0836 Bug 1620248 - [devtools] Make hooks.onClosed optional for all Transport classes. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D93193
2020-10-22 10:02:34 +00:00
Alexandre Poirot e1aa84044b Bug 1620248 - [devtools] Ensure destroying ContentProcess target when the target is destroyed before process shutdown. r=nchevobbe,jdescottes
For now, we were emitting the "tabDetached" event on message-manager-close (=process shutdown),
or when the DevToolsServerConnection closes (=client closes the connection).
But not when the target is being destroyed by the frontend when calling ResourceWatcher.unwatchTargets,
which is calling process-helper's destroyTargets.
This was introducing test failure (browser_target_list_watchTargets.js) with never resolving RDP requests.

Differential Revision: https://phabricator.services.mozilla.com/D91559
2020-10-22 10:02:31 +00:00
Dorel Luca 1ff59cb7a3 Backed out changeset 7558c8821a07 (bug 1654103) for multiple failures. CLOSED TREE 2020-10-22 03:51:06 +03:00
Ricky Stewart 50762dacab Bug 1654103: Standardize on Black for Python code in `mozilla-central`. r=remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers,devtools-backward-compat-reviewers,jgilbert,preferences-reviewers,sylvestre,maja_zf,webcompat-reviewers,denschub,ntim,whimboo,sparky
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.

To produce this patch I did all of the following:

1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.

2. Run ./mach lint --linter black --fix

3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.

4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D94045
2020-10-21 21:27:27 +00:00
Bogdan Tara 3f38cbb0f8 Backed out 2 changesets (bug 1666519) for devtools leaks and failures CLOSED TREE
Backed out changeset 94c066ab05dc (bug 1666519)
Backed out changeset 990b312b5abe (bug 1666519)
2020-10-21 18:42:25 +03:00
Emilio Cobos Álvarez 9944e5344c Bug 1634776 - Fix some cascade level checks in devtools. r=rcaliman
The regression was caused because it incorrectly started treating user
stylesheets as "system" sheets, which can't be modified.

Fix the regression by properly using SharedCssLogic.isAgentStylesheet
instead.

Also fix the check for whether chrome rules apply to handle user
stylesheets and inline style attributes in chrome documents correctly,
see the comment.

Differential Revision: https://phabricator.services.mozilla.com/D93088
2020-10-21 14:56:46 +00:00
Belén Albeza 223b34efcf Bug 1666519 - Part 1: [devtools] Add localStorage resource r=ochameau
Tests are added in the next revision of the stack: D93808

Differential Revision: https://phabricator.services.mozilla.com/D92634
2020-10-21 14:05:14 +00:00
Julian Descottes f78ea8ee85 Bug 1671676 - [devtools] Update browser_setupInParentChild.js to only test setupInParent r=ochameau
Depends on D93821

Differential Revision: https://phabricator.services.mozilla.com/D93822
2020-10-20 20:48:54 +00:00
Julian Descottes 138356ac36 Bug 1671676 - [devtools] Remove setupInChild from DevTools codebase r=ochameau
Depends on D93820

This is no longer used, except in one test which will be cleaned up in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D93821
2020-10-20 20:48:35 +00:00
Julian Descottes 134032de33 Bug 1671609 - [devtools] Simplify message manager handling in storage actor r=ochameau,ladybenko
Depends on D93817

There should no longer be new message managers during the lifecycle of the actor.
We can simplify the storage actor thanks to this.

Differential Revision: https://phabricator.services.mozilla.com/D93819
2020-10-20 17:02:36 +00:00
Julian Descottes 23b2aef1c7 Bug 1671609 - [devtools] Remove browserSwap support from devtools r=ochameau
This method was only useful for the old RDM implementation and can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D93817
2020-10-20 17:02:34 +00:00
Razvan Maries 3954e7eb5a Backed out 5 changesets (bug 1671676, bug 1671609) for Lint failure on frame.js. CLOSED TREE
Backed out changeset aba7c7caae10 (bug 1671676)
Backed out changeset 68449199cb9a (bug 1671676)
Backed out changeset 107e0c2f141a (bug 1671609)
Backed out changeset 02bc34c28501 (bug 1671609)
Backed out changeset 5efd9f6968ed (bug 1671609)
2020-10-20 19:59:11 +03:00
Julian Descottes 305bfc6182 Bug 1671676 - [devtools] Update browser_setupInParentChild.js to only test setupInParent r=ochameau
Depends on D93821

Differential Revision: https://phabricator.services.mozilla.com/D93822
2020-10-19 09:59:11 +00:00
Julian Descottes aef14fc3b4 Bug 1671676 - [devtools] Remove setupInChild from DevTools codebase r=ochameau
Depends on D93820

This is no longer used, except in one test which will be cleaned up in the next changeset.

Differential Revision: https://phabricator.services.mozilla.com/D93821
2020-10-19 19:34:25 +00:00
Julian Descottes 157cd2cea2 Bug 1671609 - [devtools] Simplify message manager handling in storage actor r=ochameau,ladybenko
Depends on D93817

There should no longer be new message managers during the lifecycle of the actor.
We can simplify the storage actor thanks to this.

Differential Revision: https://phabricator.services.mozilla.com/D93819
2020-10-20 16:23:08 +00:00
Julian Descottes 66b1914d6f Bug 1671609 - [devtools] Remove browserSwap support from devtools r=ochameau
This method was only useful for the old RDM implementation and can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D93817
2020-10-19 09:32:56 +00:00
Csoregi Natalia f9e58cacd1 Backed out 9 changesets (bug 1623667) for failures on devtools/client/*. CLOSED TREE
Backed out changeset 54ca4d13f54f (bug 1623667)
Backed out changeset ce62de8733f1 (bug 1623667)
Backed out changeset 4877c0c5ba2c (bug 1623667)
Backed out changeset d32decff7ea8 (bug 1623667)
Backed out changeset 53a2c44f955b (bug 1623667)
Backed out changeset 0addf3282b72 (bug 1623667)
Backed out changeset feeb0f0b3bb3 (bug 1623667)
Backed out changeset f90ccc4f5210 (bug 1623667)
Backed out changeset e18376ee942f (bug 1623667)
2020-10-20 17:39:28 +03:00
Razvan Caliman 1d2ad58af3 Bug 1623667 - [devtools] Update CustomHighlighterActor comments and docs r=ochameau
Depends on D92220

Rephrasing of code comments and cleanup of documentation to reflect that `CustomHighlighterActor` is now the only actor which deals with highlighting stuff after removing `HighlighterActor` in D92220. No functionality is changed in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D92221
2020-10-14 14:19:39 +00:00
Razvan Caliman e7d88cfad5 Bug 1623667 - [devtools] Remove HighlighterActor r=ochameau,devtools-backward-compat-reviewers
This patch completely removes the `HighlighterActor` and its accessors.

The rest of the patches in this commit series update the consumers and tests to use the new highlighter manager added to `HighlightersOverlay` in D81526. [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) updated all consumers within the **Inspector** panel to use this approach. Now, we're updating the rest of the consumers outside the Inspector.

### Why remove HighlighterActor?

The changes introduced in D81526 for [Bug 1646028](https://bugzilla.mozilla.org/show_bug.cgi?id=1646028) make it possible to  highlight nodes using the `CustomHighligtherActor` with the **Box Model Highlighter** implementation.

The `HighlighterActor` was itself a wrapper around **Box Model Highlighter** and Simple Outline Highlighter, and exposed node picking functionality. Simple Outline Highlighter was removed with [Bug 1650094](https://bugzilla.mozilla.org/show_bug.cgi?id=1650094). The node picking functionality was decoupled from `HighlighterActor`in [Bug 1607756](https://bugzilla.mozilla.org/show_bug.cgi?id=1607756).

After those changes, `HighlighterActor` is no longer special. It can be removed in favor of a single generic actor, `CustomHighligtherActor`, with the Box Model Highlighter implementation.

Differential Revision: https://phabricator.services.mozilla.com/D92220
2020-10-13 15:40:13 +00:00
Hubert Boma Manilla 3d1f26e2cd Bug 1663523 - [devtools] Add the network event stacktrace watcher r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86809
2020-10-19 01:19:39 +00:00
Bogdan Tara 61728de827 Backed out changeset de71a00c6f68 (bug 1663523) for devtools/shared/ failures CLOSED TREE 2020-10-18 20:53:17 +03:00
Hubert Boma Manilla 403ec0015b Bug 1663523 - [devtools] Add the network event stacktrace watcher r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D86809
2020-10-18 17:11:36 +00:00
Hubert Boma Manilla 30aacc98e1 Bug 1670627 - [devtools] Pass the updateType to the data provider on the resource update event r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D93700
2020-10-16 09:42:48 +00:00
Alexandre Poirot be7dd39054 Bug 1671419 - [devtools] Avoid updating resource types if the list is empty. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D93657
2020-10-15 18:55:59 +00:00
Csoregi Natalia e0eb861a18 Backed out 4 changesets (bug 1633712) for leaks. CLOSED TREE
Backed out changeset 03553b300b86 (bug 1633712)
Backed out changeset 19c8ea0b43df (bug 1633712)
Backed out changeset 6eaa4d12b58c (bug 1633712)
Backed out changeset 10f97f47c883 (bug 1633712)
2020-10-15 09:36:36 +03:00
Nicolas Chevobbe 1e17daf388 Bug 1633712 - [devtools] Create WorkerTargets as soon as possible. r=ochameau,devtools-backward-compat-reviewers.
This patch adds support for dedicated worker targets in the Watcher actor.
Shared and Service workers are not handled yet.

In a similar manner to what we already have for frame targets, we add a worker-helper
file that will communicate with a JsWindowActor pair spawned on each document,
that will  manage workers (DevToolsWorkerParent/DevToolsWorkerChild).

For a given document, the DevToolsWorkerChild will enumerate the existing workers
related to it, as well as add an event listener to be notified when workers are
being registered and unregistered, and communicate that back to the DevToolsWorkerParent
on the main thread, so worker targets creation and destruction are notified by
the Watcher actor (via target-available-form and target-destroyed-form events).

When a worker is created, the DevToolsWorkerChild for the document the worker
was spawned from will create a WorkerTargetActor, that will live in the worker
thread (using worker-connector.js), passing it resources the Watcher is currently
listening for. It will also handle communication between the main thread and the
worker thread, when the watcher listen to new resources (or stop watching resources).

A WorkerTargetFront is created so the client can be notified about available
resources (via the resource-available-form event, emitted from the worker target).

Tests are added in the next patches of this queue.

Differential Revision: https://phabricator.services.mozilla.com/D85399
2020-10-15 05:17:52 +00:00
Nicolas Chevobbe 54da2bd313 Bug 1633712 - [devtools] Move shouldNotifyWindowGlobal and getAllRemoteBrowsingContexts to a util file. r=ochameau.
These functions will be used by the worker-helper.js module as well.

Differential Revision: https://phabricator.services.mozilla.com/D92751
2020-10-15 05:11:58 +00:00
JulianWels b88cf407ac Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 12:27:26 +00:00
Mihai Alexandru Michis 55dd1dbe43 Backed out changeset b3fb1b5bbe34 (bug 1608074) for causing bustages in XMLHttpRequestMainThread.cpp
CLOSED TREE
2020-10-13 14:55:06 +03:00
JulianWels 2ae8134434 Bug 1608074 - Set channel ReferrerInfo in privileged code instead of referrer header r=nchevobbe,mixedpuppy,valentin
Differential Revision: https://phabricator.services.mozilla.com/D59856
2020-10-13 10:39:11 +00:00
Julian Descottes 4d7f2e708f Bug 1669681 - [devtools] Ignore detach errors when purging Front requests r=ochameau
Depends on D92756

Detach errors can happen when a target is being destroyed.
Historically, those errors were swallowed in the TargetFront mixin.
However this logic became outdated when we started purging requests during Front::destroy.

This results in non-actionable error messages logged frequently while using DevTools.
This changeset updates the logic in target-mixin.js in order to swallow errors due to purged requests.

Differential Revision: https://phabricator.services.mozilla.com/D92757
2020-10-12 08:12:53 +00:00
Julian Descottes d4c1319148 Bug 1669681 - [devtools] Stop processing packet responses in destroyed Fronts r=ochameau
Depends on D93030

All Front requests are purged before the Front is destroyed.
In theory there is no reason to process packets after the Front has been destroyed.
It will only create cryptic error messages.

Differential Revision: https://phabricator.services.mozilla.com/D92756
2020-10-12 08:13:06 +00:00
Alexandre Poirot 342c1ad0be Bug 1669545 - [devtools] Print internal error codes instead of only "Blocked" when there is not explicit blocking reason. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92657
2020-10-09 13:45:55 +00:00
Emilio Cobos Álvarez 4d89ea6d7c Bug 1654866 - Make style inspector account for UA/chrome sheets and quirks properly. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D92633
2020-10-09 11:56:18 +00:00
Sylvestre Ledru cad53f4804 Bug 1588458 - Replace dxr links by searchfox in the code/test r=kats,sparky
Differential Revision: https://phabricator.services.mozilla.com/D92792
2020-10-08 14:02:40 +00:00
Alexandre Poirot af7666a292 Bug 1669527 - [devtools] Ensure destroying the NetworkMonitorActor spawn in the parent process. r=Honza,jdescottes
The WebConsoleActor tries to destroy it via a debug:destroy-network-monitor.
But as it is done during the destruction of the target actor, typically when there is a
top level target switching, this message doesn't reach the parent process.
So, ensure destroying this actor from the parent process side, when we see that the
frame target is being destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D92654
2020-10-07 13:39:48 +00:00
Alexandre Poirot e11f76a190 Bug 1669473 - [devtools] Fix a typo around event timings. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92605
2020-10-07 16:00:50 +00:00
Alexandre Poirot e69ee12648 Bug 1669473 - [devtools] add built-in logging for platform events in NetworkObserver. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92604
2020-10-07 16:00:47 +00:00
Nicolas Chevobbe 37873fd6f8 Bug 1669655 - [devtools] Cleanup worker-connector.js and startup/worker.js. r=ochameau.
- Rename `id` to a more explicit `forwardingPrefix` property
- Add comments to why we need to handle a list of connections
- Remove the `rpcs` property from the connections object
- Turn `rpcDeferred` from an array to an object, as it's used like one.

Differential Revision: https://phabricator.services.mozilla.com/D92752
2020-10-08 05:54:18 +00:00
Razvan Maries e523193665 Backed out 2 changesets (bug 1669473) for perma failures on browser_net_block-csp.js. CLOSED TREE
Backed out changeset d798c548257e (bug 1669473)
Backed out changeset d25a3deb4961 (bug 1669473)
2020-10-07 17:46:31 +03:00
Alexandre Poirot 434bebe5da Bug 1669473 - [devtools] Fix a typo around event timings. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92605
2020-10-07 08:24:51 +00:00
Alexandre Poirot 73a6605181 Bug 1669473 - [devtools] add built-in logging for platform events in NetworkObserver. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D92604
2020-10-07 11:35:03 +00:00
Alexandre Poirot 2c3d8677f9 Bug 1667839 - Pass watchedData to already existing targets. r=nchevobbe
The previous code was all wrong and we weren't correctly listening to resource
for already existing additional targets. Top level target was still working fine
thanks to WatcherActor.watchResources calling watchTargetResource directly.

Differential Revision: https://phabricator.services.mozilla.com/D91969
2020-10-05 20:52:23 +00:00
Gabriel Luong 7afa635edb Bug 1662059 - [devtools] Only read devtools.overflow.debugging.enabled from the client. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D92363
2020-10-06 02:50:38 +00:00
Gabriel Luong 18a75c17f7 Bug 1660973 - [devtools] Return a disconnectedNodeArray for getOverflowCausingElements. r=jdescottes,devtools-backward-compat-reviewers
The problem with `getOverflowCausingElement`s seems to be that it returned an array
of nodes that weren't properly attached to their parents.

To mitigate this, we call `attachElements` on the entire list of nodes and
return a `disconnectedNodeArray` which ensures that the returned nodes
are properly attached and therefore has all their parent node information
when calling `showNode`.

Differential Revision: https://phabricator.services.mozilla.com/D92360
2020-10-05 15:58:21 +00:00
Gijs Kruitbosch 1aa2c4d5db Bug 1668274 - update eslint, eslint-plugin-no-unsanitized and mocha to allow use of logical assignment operators, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D91933
2020-10-02 18:00:40 +00:00
Nicolas Chevobbe 6e140506a1 Bug 1662734 - [devtools] Create an actual WorkerTargetActor and use it in startup/worker.js . r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This patch adds a simple WorkerTargetActor, which is similar to the mock target
actor we had in startup/worker.js.

Its spec file is empty at the moment, and it does not have an associated front,
but that might change with Bug 1633712 where we will at least have events for
resources available/destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D91128
2020-09-29 14:47:34 +00:00
Nicolas Chevobbe 056b9542f2 Bug 1573779 - [devtools] Rename WorkerTargetActorList to WorkerDescriptorActorList. r=jdescottes.
This class is creating (and handling) WorkerDescriptorActor now, so we rename
it to make it explicit.

Differential Revision: https://phabricator.services.mozilla.com/D91557
2020-09-29 14:31:10 +00:00
Nicolas Chevobbe f315ff58cd Bug 1573779 - [devtools] Rename WorkerTarget to WorkerDescriptor. r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This renames the current WorkerTargetActor which is actually a descriptor.
We also rename the existing `workerTargetFront` occurences to `workerDescriptorFront`
to avoid confusion when we do introduce the real worker fronts and actors.

Differential Revision: https://phabricator.services.mozilla.com/D91100
2020-09-29 14:30:24 +00:00
Dorel Luca f826d52619 Backed out 3 changesets (bug 1573779, bug 1662734) for Geckoview failures. CLOSED TREE
Backed out changeset 0adff4f08b28 (bug 1662734)
Backed out changeset c6bb84f2a032 (bug 1573779)
Backed out changeset 0c605800aa6b (bug 1573779)
2020-09-29 12:59:39 +03:00
Nicolas Chevobbe 68ba8f3d46 Bug 1662734 - [devtools] Create an actual WorkerTargetActor and use it in startup/worker.js . r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This patch adds a simple WorkerTargetActor, which is similar to the mock target
actor we had in startup/worker.js.

Its spec file is empty at the moment, and it does not have an associated front,
but that might change with Bug 1633712 where we will at least have events for
resources available/destroyed.

Differential Revision: https://phabricator.services.mozilla.com/D91128
2020-09-28 12:29:11 +00:00
Nicolas Chevobbe bda0dabd83 Bug 1573779 - [devtools] Rename WorkerTargetActorList to WorkerDescriptorActorList. r=jdescottes.
This class is creating (and handling) WorkerDescriptorActor now, so we rename
it to make it explicit.

Differential Revision: https://phabricator.services.mozilla.com/D91557
2020-09-29 01:54:32 +00:00
Nicolas Chevobbe 4914f8c614 Bug 1573779 - [devtools] Rename WorkerTarget to WorkerDescriptor. r=ochameau,jdescottes,devtools-backward-compat-reviewers.
This renames the current WorkerTargetActor which is actually a descriptor.
We also rename the existing `workerTargetFront` occurences to `workerDescriptorFront`
to avoid confusion when we do introduce the real worker fronts and actors.

Differential Revision: https://phabricator.services.mozilla.com/D91100
2020-09-28 12:27:22 +00:00
Frederic Wang 0eebca3c33 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-26 03:04:56 +00:00
Narcis Beleuzu 679469fad8 Backed out changeset 239f29a99c4f (bug 1667118) for bc failure on browser_parsable_css.js . CLOSED TREE 2020-09-25 23:39:15 +03:00
Frederic Wang 5461921d85 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-25 18:37:39 +00:00
Mihai Alexandru Michis cc04d2696e Backed out changeset b08319695e21 (bug 1667118) for causing xpcshell failures in test_css-properties-db.js
CLOSED TREE
2020-09-25 16:40:33 +03:00
Frederic Wang eb4b491896 Bug 1667118 - Rename -moz-math-script-level to math-depth. r=emilio
This renames the internal -moz-math-script-level property in order to
prepare for full math-depth support. Currently, the property is guarded
under a disabled-by-default flag, so there should be no observable
behavior change.

Differential Revision: https://phabricator.services.mozilla.com/D91285
2020-09-25 12:04:53 +00:00