Commit Graph

4383 Commits

Author SHA1 Message Date
Alexandre Poirot
2fa4a4364b Bug 1685493 - Ensure breaking in xpcshell test, even if first line isn't breakable. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D101019
2021-01-19 11:01:54 +00:00
Masatoshi Kimura
54c1b8dee1 Bug 1687108 - Remove unused content policy types. r=ckerschb,remote-protocol-reviewers,smaug
Differential Revision: https://phabricator.services.mozilla.com/D102083
2021-01-19 09:42:13 +00:00
Hubert Boma Manilla
86a26392f1 Bug 1687205 - [devtools] Use the network event actor id when getting stacktraces r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D102116
2021-01-18 17:28:03 +00:00
Hubert Boma Manilla
9cb65eed7f Bug 1665383 - [devtools] Enable NETWORK_EVENT and NETWORK_EVENT_STACKTRACE by default for fission r=ochameau
Enable NETWORK_EVENT and NETWORK_EVENT_STACKTRACE resources by default

Differential Revision: https://phabricator.services.mozilla.com/D99625
2021-01-18 17:27:55 +00:00
Nicolas Chevobbe
a862e95663 Bug 1607741 - [devtools] Remove webconsole cd command. r=ladybenko.
The command is removed and the test that were using it
are either removed or updated.

Differential Revision: https://phabricator.services.mozilla.com/D101928
2021-01-18 17:02:14 +00:00
Noemi Erli
77bb8db1ff Backed out 3 changesets (bug 1687205, bug 1687192, bug 1665383) for causing devtools failures in browser_net_block-csp.js CLOSED TREE
Backed out changeset 812caf90c2c5 (bug 1687192)
Backed out changeset 68f676381ab4 (bug 1687205)
Backed out changeset 34dd7e523954 (bug 1665383)
2021-01-18 18:00:02 +02:00
Hubert Boma Manilla
2f728bd220 Bug 1687205 - [devtools] Use the network event actor id when getting stacktraces r=ochameau,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D102116
2021-01-18 12:50:14 +00:00
Hubert Boma Manilla
f62c623e39 Bug 1665383 - [devtools] Enable NETWORK_EVENT and NETWORK_EVENT_STACKTRACE by default for fission r=ochameau
Enable NETWORK_EVENT and NETWORK_EVENT_STACKTRACE resources by default

Differential Revision: https://phabricator.services.mozilla.com/D99625
2021-01-18 12:50:06 +00:00
Alexandre Poirot
8e41ab4800 Bug 1489217 - Pull out headers and cookies fetching from _createNetworkEvent into a dedicated function. r=bomsy
I'm doing that because previous patch triggered an eslint warning
about _createNetworkEvent being too complex.

Differential Revision: https://phabricator.services.mozilla.com/D101829
2021-01-18 08:48:12 +00:00
Alexandre Poirot
4544e6fbb4 Bug 1489217 - Avoid 'NS_ERROR_FAILURE [nsITraceableChannel.setNewListener]' exception when running DevTools. r=bomsy
This exception happens quite frequently with Fission enabled as we start observing requests
while the page already start loading. This happens frequently when target switching.

Differential Revision: https://phabricator.services.mozilla.com/D101828
2021-01-18 08:49:50 +00:00
Micah Tigley
1b5b46ec79 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs,marionette-reviewers,whimboo,remote-protocol-reviewers
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-14 21:45:14 +00:00
Alexandre Poirot
cae099948e Bug 1686564 - [devtools] Register onExceptionUnwind only once. r=nchevobbe
Stop unregistering onExceptionUnwind on navigation (will-navigate) and pauses.
So that we no longer have to re-register it on window-ready and resume.
Instead, only check that we aren't paused when processing an exception.
Regarding navigation, I don't think we want to ignore any exception during the process of navigating to another page.
I would rather say we want to catch anything that happen during this process!

Differential Revision: https://phabricator.services.mozilla.com/D101651
2021-01-14 08:28:18 +00:00
Alexandre Poirot
b326fcddff Bug 1686480 - [devtools] Make ThreadActor.pauseOnExceptions just a wrapper to reconfigure method. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101650
2021-01-14 07:51:33 +00:00
Alexandre Poirot
b95dbbd583 Bug 1686480 - [devtools] Allow all options currently passed to ThreadActor.attach to be passed via ThreadActor.reconfigure. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101471
2021-01-14 07:54:01 +00:00
Alexandre Poirot
04a5a9ecf9 Bug 1686480 - [devtools] A few naive cleanups in ThreadActor. r=nchevobbe
Bind onExceptionUnwind only once, remove unused _scripts attribute, create _debuggerSourcesSeen from constructor.

Differential Revision: https://phabricator.services.mozilla.com/D101470
2021-01-14 07:50:56 +00:00
Mihai Alexandru Michis
2abb23a415 Backed out 4 changesets (bug 1680637, bug 1682395) for causing mochitest failures in browser_javascriptDialog*.js
CLOSED TREE

Backed out changeset f5c4603fc02d (bug 1680637)
Backed out changeset 2f89ad4b915e (bug 1682395)
Backed out changeset 2b7e1df00a1c (bug 1680637)
Backed out changeset c35335c49551 (bug 1680637)
2021-01-14 01:51:52 +02:00
Sebastian Zartner
7ba40f5b60 Bug 1579017 - Corrected inactive CSS rule for order property, making it valid for grid items. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D101267
2021-01-13 19:28:17 +00:00
Julian Descottes
75d7922fc7 Bug 1589658 - [devtools] Guard against missing handlerDO.script in React event-collector r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101599
2021-01-13 15:16:07 +00:00
Micah Tigley
298219ee45 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs,marionette-reviewers,whimboo
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-13 13:27:08 +00:00
Falguni Islam
d6961d7fdf Bug 1681888 - [devtools] Remove defer usage in devtools/server/startup/worker.js. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100552
2021-01-13 13:58:41 +00:00
Nicolas Chevobbe
00c0475c5d Bug 1686417 - [devtools] Generate a list of deprecated DOM methods and attributes. r=ladybenko.
This patch modifies and renameGeneratePureDOMFunctions.py so it generates a new file
indicating all the deprecated properties and methods so we can retrieve those information
in DevTools, in order, for example, to not call those deprecated properties and avoid generating
warning messages.

Differential Revision: https://phabricator.services.mozilla.com/D80864
2021-01-13 13:03:10 +00:00
Julian Descottes
2d91e59e16 Bug 1682029 - [devtools] Remove unused screenshotToDataUrl in devtools/server/actors/device.js r=devtools-backward-compat-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101347
2021-01-13 09:06:16 +00:00
Butkovits Atila
7742c03714 Backed out 4 changesets (bug 1680637, bug 1682395) for causing Marionette failures. CLOSED TREE
Backed out changeset 073e0be7db95 (bug 1680637)
Backed out changeset 552b91b31b0f (bug 1682395)
Backed out changeset c80de6c72779 (bug 1680637)
Backed out changeset d513e228b0ad (bug 1680637)
2021-01-13 02:13:06 +02:00
Micah Tigley
06e7942185 Bug 1680637 - Update tests using the old dialog UI to only use the old UI. r=jaws,Gijs
Depends on D100172

Differential Revision: https://phabricator.services.mozilla.com/D101388
2021-01-12 22:32:24 +00:00
Alexandre Poirot
c6424c9f35 Bug 1685090 - [devtools] Set breakpoints against the top level process target in the context of the browser toolbox. r=jdescottes
We need to use the same technique as in watchResources in order to ensure
reaching out the top level targets running in the parent process...

Differential Revision: https://phabricator.services.mozilla.com/D100926
2021-01-11 13:20:30 +00:00
Alexandre Poirot
0dc8212706 Bug 1685257 - [devtools] Remove unused allowChromeProcess trait. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101017
2021-01-07 13:40:46 +00:00
pedrofonsecadev
a9d7e2e52e Bug 1681893 -[devtools] Remove defer usage in devtools/server/tests/xpcshell/head_dbg.js r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D101258
2021-01-11 07:49:25 +00:00
Sebastian Zartner
bf1098943a Bug 1551569 - New inactive CSS rule to show warning when margin or padding is used on internal table elements. r=nchevobbe,flod
Differential Revision: https://phabricator.services.mozilla.com/D101091
2021-01-11 07:30:02 +00:00
Nicolas Chevobbe
947d31a9ff Bug 1685667 - Move devtools/shared/screenshot files to client/server. r=jdescottes.
Since capture.js was only loaded by server files and
save.js by client files, there wasn't any reason to
have them in devtools/shared.
The files are moved and the references are updated.

Differential Revision: https://phabricator.services.mozilla.com/D101142
2021-01-08 17:36:36 +00:00
Emilio Cobos Álvarez
2b7ccb7ce1 Bug 1685917 - Remove the moz-focus-outer code. r=heycam
This pseudo does nothing and we successfully removed it in bug 1655859
(firefox 81).

Differential Revision: https://phabricator.services.mozilla.com/D101289
2021-01-11 01:57:17 +00:00
Paul Zuehlcke
fd417d4f9f Bug 1628936 - [devtools] Use the correct storage principal for handling cookies. r=ladybenko
For iframes it's important that we use the correct storage principal when interacting with cookies.
With dFPI enabled the origin attributes of third party contexts are different from the top ones.
This led to situations where we didn't show any cookies for storage isolated third party frames.

Differential Revision: https://phabricator.services.mozilla.com/D99439
2021-01-08 16:33:36 +00:00
Nicolas Chevobbe
cf1c89970f Bug 1439963 - [devtools] Handle evaluation result in a new task, after the evaluation is done. r=ochameau.
This way we ensure that any microtask created by the evaluated expression are
run, which can impact what we send to the client (e.g. `Promise.resolve().then(() => 246)`
will show a resolved promise instead of a pending one).
Some stubs and node tests are added to ensure this does fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D100979
2021-01-08 13:47:00 +00:00
Alexandre Poirot
dae4c7eb6f Bug 1682780 - [devtools] Used contants to define ThreadActor state attribute. r=jdescottes,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100986
2021-01-07 13:36:11 +00:00
Alexandre Poirot
31c22e4866 Bug 1682780 - [devtools] Remove special hack around ThreadActor.attach from protocol.js internals. r=nchevobbe,jdescottes
This is no longer necessary as attach is no longer entering in a nested event loop.
And so we can have attach to complete and return its value as any other request.

Differential Revision: https://phabricator.services.mozilla.com/D100045
2021-01-07 13:32:41 +00:00
Alexandre Poirot
6fbec57619 Bug 1682780 - [devtools] Adapt tests and doc now that ThreadActor.attach no longer pause the thread. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D100022
2021-01-07 13:33:40 +00:00
Alexandre Poirot
3f9e98f591 Bug 1682780 - [devtools] Avoid pausing on thread actor's attach request. r=nchevobbe,jdescottes
We always used to pause when "attaching" the thread actor.
We ought to call ThreadActor's attach method first before using it.
And this method do various things:
  * Initialize the Debugger API, enable it, register various listeners, so that breakpoint can work,
  * Pause the current thread by starting a nested event loop
So that we also ought to resume the thread, by calling ThreadActor's resume right after attach.
Otherwise the page would be paused as soon as we open the DevTools.
Which sounds like something we might have wanted a very long time ago.
But sounds like pure legacy behavior from today's perspective.

Differential Revision: https://phabricator.services.mozilla.com/D99919
2021-01-07 15:02:11 +00:00
Alexandre Poirot
8440986b83 Bug 1682780 - [devtools] Remove unused callback arguments from xpshell debugger test helpers. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D99918
2021-01-07 13:08:13 +00:00
Kartik Gautam
7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
Mihai Alexandru Michis
b4e3622ffe Backed out changeset c17d361450d3 (bug 1681893) for causing eslint failures in test_nesting-<01/02>.js
CLOSED TREE
2021-01-06 12:40:55 +02:00
pedrofonsecadev
3a0474b856 Bug 1681893 -[devtools] Remove defer usage in devtools/server/tests/xpcshell/head_dbg.js r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D100880
2021-01-06 10:06:31 +00:00
Hubert Boma Manilla
bf8708542a Bug 1685262 - [devtools] Add blockRequest/unblockRequest commands support r=ochameau,devtools-backward-compat-reviewers,nchevobbe
Fixes browser_jsterm_block_commands.js test

Differential Revision: https://phabricator.services.mozilla.com/D99622
2021-01-06 09:46:43 +00:00
Mark Banner
14da69d10f Bug 1684905 - Fully enable globalThis for ESLint. r=Gijs,necko-reviewers,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D100697
2021-01-04 20:32:57 +00:00
Cosmin Sabou
2978aa00a3 Backed out changeset dbed1cdf588f (bug 1684173) for mochitest plain and devtools failures. a=backout DONTBUILD 2020-12-28 00:43:51 +02:00
Kartik Gautam
775cdec032 Bug 1684173 - Add newline character at end of files when missing r=sylvestre
Depends on D100443

Differential Revision: https://phabricator.services.mozilla.com/D100484
2020-12-27 11:43:41 +00:00
Nicolas Chevobbe
ac3a027268 Bug 1679043 - [devtools] Fix race condition in StyleEditor when editing style sheet. r=daisuke,ochameau,devtools-backward-compat-reviewers,bomsy.
When the user edits a stylesheet in the StyleEditor, an `_isUpdating` flag is toggled,
and a request is sent to the server to actually apply those changes to the stylesheet.
It then causes a style-applied event to be emitted (or the stylesheet resource
to be updated, if watcher support is enabled for stylesheet).
In the end, this triggers the onStyleApplied function in the StyleEditor, where
we check if the `_isUpdating` flag is true (to know if the event was caused
through editing in style editor), and if not, replace the stylesheet content.

Unfortunately there's a race condition when the user is typing (and sending
multiple requests to the server), as the state of the _isUpdating flag could
be wrong if a new request is sent before the first one is handled.
This is probably highlighted with the throttling we're doing in the Resource API.

To fix this issue, we add a new `cause` parameter to the StyleSheets.update method,
which we set to `styleeditor` when calling update within the StyleEditor.
This `cause` parameter is then sent back by the server to the client (via the
style-applied event, or the resource update if we have Watcher support for stylesheets).
This `cause` can be checked by the StyleEditor client, and replace the check
on `_isUpdating`.

However, we need to keep the `_isUpdating` property to handle backward compatibility.

Differential Revision: https://phabricator.services.mozilla.com/D99862
2020-12-18 06:07:32 +00:00
Nicolas Chevobbe
d15f816596 Bug 1682848 - [devtools] Fix error when pausing in a content process script in the Browser Toolbox. r=bomsy.
When pausing in a content process script in the Browser Toolbox (e.g. somewhere
in devtools/server), we tried to display the PausedDebuggerOverlay, which was
causing an error to be displayed in the CanvasFrameAnonymousContentHelper, as
we didn't have access to a documentElement property it needed.

This happens because the _canShowOverlay method in the thread actor was only
checking for the presence of a window property on the target actor.
Unfortunately, the ContentProcessTargetActor does expose a window getter, which
is a Sandbox, and thus doesn't have a document.

This patch modifies the _canShowOverlay function to check that we do have access
to a documentElement.

Differential Revision: https://phabricator.services.mozilla.com/D99899
2020-12-17 08:02:40 +00:00
Kartik Gautam
f7ffcd09fb Bug 1679758 - Remove trailing empty lines r=sylvestre,marionette-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-15 10:34:54 +00:00
Alexandre Poirot
44062da776 Bug 1573327 - [devtools] Pass breakpoints via the Watcher actor. r=jdescottes,devtools-backward-compat-reviewers,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D88850
2020-12-14 08:54:25 +00:00
Dorel Luca
7320ae982a Backed out changeset f3aaf04fce3b (bug 1679758) for Devtool failures in browser_styleeditor_syncAddProperty.js. CLOSED TREE 2020-12-13 16:38:21 +02:00
Kartik Gautam
caf549c200 Bug 1679758 - Remove trailing empty lines r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D99595
2020-12-13 13:28:30 +00:00