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

3898 Коммитов

Автор SHA1 Сообщение Дата
Julian Descottes 081273c70a Bug 1703300 - [devtools] Do not notify about uninitialized fronts in Front::watchFronts r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D111093
2021-04-07 13:42:34 +00:00
Nicolas Chevobbe ccbce5af7c Bug 1703178 - [devtools] Set overrideDPPX browsingContext property in the parent process. r=jdescottes,devtools-backward-compat-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D110927
2021-04-07 12:13:48 +00:00
Nicolas Chevobbe 305b07e914 Bug 1702744 - [devtools] Set browsingContext flags from parent process. r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D110515
2021-04-07 07:01:08 +00:00
Hubert Boma Manilla ac7b968385 Bug 1638259 - [devtools] Add test for CSP blocked styles r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D110840
2021-04-06 22:40:26 +00:00
Hubert Boma Manilla 0857aa62ef Bug 1689644 - [devtools] Add test for network events from the content process r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D110839
2021-04-06 22:40:25 +00:00
Daisuke Akatsuka 9b07a0d7ce Bug 1703145: Update MDN compat data. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D110882
2021-04-06 22:23:16 +00:00
Julian Descottes b0935928d0 Bug 1644397 - [devtools] Create tab targets on process change via the Watcher Actor. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D105544
2021-04-01 22:11:25 +00:00
Alexandre Poirot c900b93c42 Bug 1631451 - [devtools] Prevent re-entrant destroy loop in Pool.destroy. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D110097
2021-04-01 13:43:58 +00:00
Alexandre Poirot 547220f7e4 Bug 1631451 - [devtools] Control DevToolsClient closure from Descriptor instead of Target. r=nchevobbe,jdescottes
Still use a shouldCloseClient flag, but instead of closing the client from the target's destruction,
from which we should ignore cross process target switching,
we now close it from the descriptor destruction.
Descriptor destruction should only happen when the toolbox is meant to be closed.

Differential Revision: https://phabricator.services.mozilla.com/D106835
2021-04-01 13:43:57 +00:00
Alexandre Poirot 4290423f9b Bug 1631451 - [devtools] Destroy target front via Watcher's target-destroyed-form. r=nchevobbe,jdescottes
That, instead of tabDetached event, fired on the target actor themself.

Differential Revision: https://phabricator.services.mozilla.com/D108578
2021-04-01 13:43:57 +00:00
Alexandre Poirot c8f91a99da Bug 1699493 - [devtools] Migrate WebExtInspectedWindow front to a command. r=nchevobbe,rpl
- implement the new "inspected-window" command
- move WebExtensionInspectedWindowFront implement to the command, making the front empty
- migrate tests to use the commands instead of front
- stop maintaining the current top level target in ExtensionParent.jsm, no longer have to use watchTargets
- stop creating a new descriptor on each new target
- instead only pull one new dedicated "commands" for WebExt (still in ExtensionParent.jsm)
- remove TabDescriptor isDevToolsExtensionContext as we no longer need anything special in the descriptor
- remove now unused methods on DevToolsShims (createWebExtensionInspectedWindowFront, createDescriptorForTabForWebExtension)
- remove the now unused TabDescriptorFactory.createDescriptorForTab's "forceCreationForWebextension" option, as CommandsFactory.forTab always instantiate a brand new commands
- migrate webext to use the command instead of front

Differential Revision: https://phabricator.services.mozilla.com/D108994
2021-04-01 10:31:43 +00:00
Alexandre Poirot 098a0f42dd Bug 1702053 - [devtools] Renamed targetList occurences to targetCommand in the targetCommand tests. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D110319
2021-03-31 09:32:18 +00:00
Nicolas Chevobbe b46c2f3c00 Bug 1701634 - [devtools] Add a TargetConfiguration command. r=ochameau.
Move the methods of the targetCommand that were related to targetConfiguration
to a dedicated command.
We also move the custom TargetConfigurationFront methods into the command.
Callsites are modified to use the new command. Doing so for the debugger involved
a bit more work as we needed to pass the command to the existing `setupCommands`
bootstrap function.

Differential Revision: https://phabricator.services.mozilla.com/D110200
2021-03-30 14:13:31 +00:00
Daisuke Akatsuka 51709b916b Bug 1699040: Send properties as a part of status. r=jdescottes,devtools-backward-compat-reviewers
As we don't have to get the properties separately anymore, include the properties into the state.

Depends on D109846

Differential Revision: https://phabricator.services.mozilla.com/D109847
2021-03-29 08:21:31 +00:00
Belén Albeza 5a57502c75 Bug 1666529 - [devtools] Part 1: Add cookie storage resource r=ochameau,jdescottes,devtools-backward-compat-reviewers
This adds a resource for the cookie storage type, that supports inspecting iframes, etc. on Fission.

NOTE: in order to use this new resource, set the `devtools.testing.enableServerWatcherSupport` to `true`

Differential Revision: https://phabricator.services.mozilla.com/D108040
2021-03-27 16:30:28 +00:00
Butkovits Atila a62df7ef05 Backed out 2 changesets (bug 1666529) for causing lint failures.
Backed out changeset 24a6a96f3536 (bug 1666529)
Backed out changeset 3be87c868f09 (bug 1666529)
2021-03-26 18:42:31 +02:00
Belén Albeza 73f1a65656 Bug 1666529 - [devtools] Part 1: Add cookie storage resource r=ochameau,jdescottes,devtools-backward-compat-reviewers
This adds a resource for the cookie storage type, that supports inspecting iframes, etc. on Fission.

NOTE: in order to use this new resource, set the `devtools.testing.enableServerWatcherSupport` to `true`

Differential Revision: https://phabricator.services.mozilla.com/D108040
2021-03-26 14:12:52 +00:00
Nicolas Chevobbe fc741f13a9 Bug 1685268 - [devtools] Enable Stylesheet resource server support for content toolbox. r=ochameau
Enabling the support for stylesheet resources highlighted some issue with the
current situation.
A couple server tests needed to instantiate a resource watcher to pass.
We also add a test case for link from inspector to stylesheet when doing a same
process navigation (we already had one for target switching).

Differential Revision: https://phabricator.services.mozilla.com/D106081
2021-03-26 09:46:33 +00:00
Nicolas Chevobbe a4cffb88df Bug 1685268 - [devtools] Don't clear StyleEditor UI on redundant dom-loading event. r=jdescottes,ochameau.
With the previous patches in this queue, it looks like the
timing is stlightly modified, and on initial load we can
reveive stylesheet resources _before_ the intial dom-loading
event.
Since we're using dom-loading to clear the UI, we might destroy
stylesheets that we shouldn't.
We fix that in 2 folds:
- clear the UI in onTargetAvailable, which we do receive before any resources
- add a flag to the `dom-loading` resource when we're already going to be triggering
  onTargetAvailable for a given interaction (toolbox opening, cross-process
  navigation or any navigation when target will follow the global lifecycle).

Differential Revision: https://phabricator.services.mozilla.com/D109471
2021-03-26 09:46:33 +00:00
Nicolas Chevobbe 28f4165fb6 Bug 1685268 - [devtools] Watch for stylesheet resources from inspector front instead of inspector panel. r=ochameau.
This was previously done in the inspector panel initialization phase, after the
inspector front was created, which could lead to races.
Since the pageStyle actor requires stylesheets to being watched (when watcher
support is enabled), we do this in the inspector front, before creating the
page style actor.
We put the resourceWatcher instance on targetFront from resourceWatcher#_onTargetAvailable
so we can use it from everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D109470
2021-03-26 09:46:32 +00:00
Butkovits Atila 1d5f31821f Backed out 5 changesets (bug 1685268) for causing failures on test_styles-applied.html. CLOSED TREE
Backed out changeset 331d6b2d6f1b (bug 1685268)
Backed out changeset 0068e7f023ce (bug 1685268)
Backed out changeset 830e139a73a0 (bug 1685268)
Backed out changeset 01de742151af (bug 1685268)
Backed out changeset 7a127a2cb052 (bug 1685268)
2021-03-26 10:03:26 +02:00
Nicolas Chevobbe f78f40d9c8 Bug 1685268 - [devtools] Enable Stylesheet resource server support for content toolbox. r=ochameau
Enabling the support for stylesheet resources highlighted some issue with the
current situation.
A couple server tests needed to instantiate a resource watcher to pass.
We also add a test case for link from inspector to stylesheet when doing a same
process navigation (we already had one for target switching).

Differential Revision: https://phabricator.services.mozilla.com/D106081
2021-03-26 06:56:12 +00:00
Nicolas Chevobbe 08ead4ae8a Bug 1685268 - [devtools] Don't clear StyleEditor UI on redundant dom-loading event. r=jdescottes,ochameau.
With the previous patches in this queue, it looks like the
timing is stlightly modified, and on initial load we can
reveive stylesheet resources _before_ the intial dom-loading
event.
Since we're using dom-loading to clear the UI, we might destroy
stylesheets that we shouldn't.
We fix that in 2 folds:
- clear the UI in onTargetAvailable, which we do receive before any resources
- add a flag to the `dom-loading` resource when we're already going to be triggering
  onTargetAvailable for a given interaction (toolbox opening, cross-process
  navigation or any navigation when target will follow the global lifecycle).

Differential Revision: https://phabricator.services.mozilla.com/D109471
2021-03-26 06:56:11 +00:00
Nicolas Chevobbe d006079dc0 Bug 1685268 - [devtools] Watch for stylesheet resources from inspector front instead of inspector panel. r=ochameau.
This was previously done in the inspector panel initialization phase, after the
inspector front was created, which could lead to races.
Since the pageStyle actor requires stylesheets to being watched (when watcher
support is enabled), we do this in the inspector front, before creating the
page style actor.
We put the resourceWatcher instance on targetFront from resourceWatcher#_onTargetAvailable
so we can use it from everywhere.

Differential Revision: https://phabricator.services.mozilla.com/D109470
2021-03-26 06:56:11 +00:00
Alexandre Poirot 743c2a228e Bug 1699200 - [devtools] Create all commands via a CommandsFactory module. r=nchevobbe,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D109494
2021-03-25 16:02:32 +00:00
Nazım Can Altınova 4356d88793 Bug 1698129 - Change the tabID sources from browsingContextId to browserId in the profiler r=nika,julienw
We have two parts in the codebase that we get the browsingContextId.
1) Inside the DOM code with profiler_register_page function whenever a
navigation happens.
2) Inside the profiler recording front-end when we start the profiler. That was
kept as activeBrowsingContextID, and now it's kept as activeTabID.

We are now changing these parts to keep the browserId instead so it directly
corresponds to the tabs. BrowsingContexts are replaced when there is a
cross-group navigation, but BrowserId is being preserved.

Differential Revision: https://phabricator.services.mozilla.com/D109281
2021-03-25 12:52:11 +00:00
Nazım Can Altınova f8b414e1c2 Bug 1698129 - Rename browsingContextID to tabID inside the profiler codebase r=julienw,gerald,devtools-backward-compat-reviewers
This patch is only  about renaming the internals of the profiler codebase and
it doesn't touch any parts that requires a backwards compatibility or version
bump.

Differential Revision: https://phabricator.services.mozilla.com/D109280
2021-03-25 12:52:10 +00:00
Alexandre Poirot ded026f627 Bug 1700106 - [devtools] Remove now-useless eslint files related to mochitests. r=jdescottes,Standard8
I kept a few having some overrides. But they may be irrelevant.
And I kept some eslint files for all folder that aren't matching the pattern matching "**/test*/**/browser*/".
Ideally we would rename these folder to match.

Last but not least, I identified one case where we were using mochitest file for xpcshell tests!

Differential Revision: https://phabricator.services.mozilla.com/D109481
2021-03-23 15:51:18 +00:00
Mike Hommey 4d8e18962b Bug 1699375 - Move WalkTheStack to mozglue. r=nika
A long standing issue is that MOZ_ASSERT and related don't print stack
traces in debug builds when they're directly or indirectly emitted from
non-libxul code. Moving WalkTheStack to mozglue alleviates the problem.

It's also not printing stack traces when emitted from C code (and for
some C third party libraries, we do redirect assert to MOZ_ASSERT),
which we solve by making the corresponding API available without C++
(which WalkTheStack being a static method of the nsTraceRefCnt class
didn't allow, or the use of a closure on Android).

This requires some adjustements to headers that indirectly assume that
Assertions.h includes ErrorList.h through nsError.h through nscore.h
through nsTraceRefcnt.h.

We also remove TestStackCrawl.cpp because it hasn't been built since
bug 158528, 19 years ago.

Differential Revision: https://phabricator.services.mozilla.com/D108913
2021-03-22 21:25:30 +00:00
Emily McDonough 44fd9a31e7 Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-22 19:08:59 +00:00
Alexandre Poirot 5757684a76 Bug 1698212 - [devtools] Assert new target via outerWindowID rather than url. r=jdescottes
Because targetFront.url may not be properly updated, this isn't a reliable attribute
to assert that we got the expected target.
First, the url passed via Target's form may be about:blank,
then will-navigate and navigate events might be missed and url won't be correctly updated.

Differential Revision: https://phabricator.services.mozilla.com/D109039
2021-03-22 12:47:38 +00:00
Brindusan Cristian 442d9401c1 Backed out changeset 7c3c130fc7df (bug 1688703) for bc leaks. CLOSED TREE 2021-03-20 03:59:04 +02:00
Dana Keeler 047c44bdd9 Bug 1688703 - reuse certviewer utility files in devtools r=johannh,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D106340
2021-03-19 21:44:16 +00:00
Alexandre Poirot 71dcc33581 Bug 1698554 - [devtools] Improve error logging when a request fails with a custom exception. r=nchevobbe
Like BrowsingContextTargetActor.detach which was throwing { error: wrongState }
and we were logging "(void 0)" because error.message was undefined,
while error was the thrown JS object.

Differential Revision: https://phabricator.services.mozilla.com/D107986
2021-03-19 10:04:48 +00:00
Butkovits Atila cfce9044e0 Backed out 2 changesets (bug 1647845) for causing build bustages. CLOSED TREE
Backed out changeset 8822a2e578f2 (bug 1647845)
Backed out changeset 5a44095128e0 (bug 1647845)
2021-03-19 01:07:18 +02:00
Emily McDonough d75c4dc4be Bug 1647845 Part 2 - Add page-size attribute to nsStyleStruct and property parsing r=emilio
This parsing is hidden behind the pref layout.css.page-size.enabled.

It isn't ideal that we parse this as a property, but we can't treat it as a
descriptor because of compatibility issues with other browsers. There are also
outstanding spec issues related to how descriptors like page-size are cascaded,
and whether the !important specifier is valid or not.

Differential Revision: https://phabricator.services.mozilla.com/D103958
2021-03-18 22:26:24 +00:00
Alexandre Poirot be9a714771 Bug 1698842 - [devtools] Avoid a few cases where targetFront is null during a client side target switching. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D108680
2021-03-18 16:28:29 +00:00
Alexandre Poirot c261f0be80 Bug 1698842 - [devtools] Avoid notifying about already destroyed targets from TargetCommand. r=nchevobbe
This helps browser_toolbox_backward_forward_navigation.js passing with fission enabled.

Differential Revision: https://phabricator.services.mozilla.com/D108648
2021-03-18 16:28:29 +00:00
Alexandre Poirot 5c242f881a Bug 1699432 - [devtools] Always listen to target-available and destroyed events from TargetCommand. r=nchevobbe,jdescottes
This is to allow destroying correctly the targets even if we aren't watching for additional targets.

Differential Revision: https://phabricator.services.mozilla.com/D108576
2021-03-18 16:28:28 +00:00
Alexandre Poirot f4691adefc Bug 1699432 - [devtools] Bail out if DevToolsClient.close becomes reentrant. r=nchevobbe
Close method may be called by the transport on close.
This was highlighted by browser_target_from_url.js
Surprisingly devtools/shared/tests/xpcshell/test_debugger_client.js
tries quite hard to cover such issue, but we seem to get yet another type of reentrancy.
This probably depends on WebSocketTransport, which is a bit hard to get covered.
No test seems to be spawning a WebSocket DevToolsServer...

Differential Revision: https://phabricator.services.mozilla.com/D107988
2021-03-18 16:28:27 +00:00
Cosmin Sabou 1b1db8ad9c Backed out 8 changesets (bug 1631451, bug 1698842) for xpcshell failures on test_breakpoint-25.js. CLOSED TREE
Backed out changeset 0d9035ed5c50 (bug 1698842)
Backed out changeset 55166c719cd2 (bug 1698842)
Backed out changeset 8cc10a259de1 (bug 1631451)
Backed out changeset bc9072114706 (bug 1631451)
Backed out changeset b5cb78fd1f61 (bug 1631451)
Backed out changeset da765754e3a8 (bug 1631451)
Backed out changeset d7a1c44ea37c (bug 1631451)
Backed out changeset 810bdfa0d899 (bug 1631451)
2021-03-18 02:35:30 +02:00
Alexandre Poirot 642795fcff Bug 1698842 - [devtools] Avoid a few cases where targetFront is null during a client side target switching. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D108680
2021-03-17 23:46:39 +00:00
Alexandre Poirot ddb7719619 Bug 1698842 - [devtools] Avoid notifying about already destroyed targets from TargetCommand. r=nchevobbe
This helps browser_toolbox_backward_forward_navigation.js passing with fission enabled.

Differential Revision: https://phabricator.services.mozilla.com/D108648
2021-03-17 23:46:39 +00:00
Alexandre Poirot 97f2421098 Bug 1631451 - [devtools] Control DevToolsClient closure from Descriptor instead of Target. r=nchevobbe,jdescottes
Still use a shouldCloseClient flag, but instead of closing the client from the target's destruction,
from which we should ignore cross process target switching,
we now close it from the descriptor destruction.
Descriptor destruction should only happen when the toolbox is meant to be closed.

Differential Revision: https://phabricator.services.mozilla.com/D106835
2021-03-17 23:46:38 +00:00
Alexandre Poirot 62af4ea387 Bug 1631451 - [devtools] Destroy target front via Watcher's target-destroyed-form. r=nchevobbe,jdescottes
That, instead of tabDetached event, fired on the target actor themself.

Differential Revision: https://phabricator.services.mozilla.com/D108578
2021-03-17 23:46:37 +00:00
Alexandre Poirot 4445a9ee50 Bug 1631451 - [devtools] Always listen to target-available and destroyed events from TargetCommand. r=nchevobbe,jdescottes
This is to allow destroying correctly the targets even if we aren't watching for additional targets.

Differential Revision: https://phabricator.services.mozilla.com/D108576
2021-03-17 23:46:37 +00:00
Alexandre Poirot 1c1911097e Bug 1631451 - [devtools] Bail out if DevToolsClient.close becomes reentrant. r=nchevobbe
Close method may be called by the transport on close.
This was highlighted by browser_target_from_url.js
Surprisingly devtools/shared/tests/xpcshell/test_debugger_client.js
tries quite hard to cover such issue, but we seem to get yet another type of reentrancy.
This probably depends on WebSocketTransport, which is a bit hard to get covered.
No test seems to be spawning a WebSocket DevToolsServer...

Differential Revision: https://phabricator.services.mozilla.com/D107988
2021-03-17 23:46:36 +00:00
Henry Vincent cc89c462df Bug 1699146 - Fix typo in error message created by Front base class r=ochameau First bug fix. Fixed typo, and then the linter wanted the code slightly reformatted.
Differential Revision: https://phabricator.services.mozilla.com/D108881
2021-03-17 23:45:49 +00:00
Markus Stange e3927f3261 Bug 1697338 - Remove unused -moz-default-appearance values -moz-mac-vibrancy-light/dark, and the system colors of the same name. r=emilio
Starting with macOS 10.14, the generic light/dark vibrancy is deprecated, and semantic vibrancy names are preferred.
If we ever need more vibrancy, we can add new values with semantic names.

Depends on D107910

Differential Revision: https://phabricator.services.mozilla.com/D108152
2021-03-17 16:50:08 +00:00
Nicolas Chevobbe 6534ca6963 Bug 1642599 - [devtools] Enable all console messages server support everywhere. r=ochameau,devtools-backward-compat-reviewers.
When enabling the watcher support, we end up having duplicate platform messages as we
received them both from the content process and the parent process (the messages are cloned).

A couple test cases are added to ensure we handle all kind of messages properly.

Depends on D107648

Differential Revision: https://phabricator.services.mozilla.com/D103285
2021-03-17 10:04:44 +00:00