Commit Graph

3924 Commits

Author SHA1 Message Date
Julian Descottes
8f530a3e07 Bug 1618059 - Extract the storage extension live reload test r=ochameau,davidwalsh
The failure only occurs locally when I use an attached target for the test_panel_live_reload mochitest.
And it only happens if we perform the `extension.upgrade` call during the test.
Most of the time it seems linked to a "frameUpdated" event fired when the webextension is being updated.
But even after commenting out the event, the test remains intermittent (albeit with a much lower frequency)

A first option would be to expose a new API on the webextension descriptor front in order to create
detached targets.

But it seems that isolating the live_reload test in a dedicated file also fixes the intermittent.
It makes the fix a bit obscure, and it probably means we won't look into the issue much furhter but
I would prefer to avoid test-only APIs in the codebase.

Differential Revision: https://phabricator.services.mozilla.com/D81322
2020-07-02 15:56:00 +00:00
Nicolas Chevobbe
d5ffb31381 Bug 1623283 - Rename Pool#actor into getActorByID. r=jdescottes.
We take this opportunity to remove Pool.get as well,
which was doing exactly the same thing as Pool.actor

This highlighted a couple issues in Reps:
- LongString were relying on the isGrip function, which was only checking that
  the actor property was truthy. So it was matching LongStringFront which had
  the actor method. This is modified by using the isLongString helper instead.
- The Object rep was building all the reps for the object properties, even in
  TINY mode, where the result was only used to check the length. In the Accessibility
  panel, it can happen that an plain object containing front properties is passed
  to Rep. It was fine before because this was short-circuited by the Accessor rep
  which was only checking the truthiness of a `get` property. With `get` being
  removed, the default Rep was used, which is Object, and we were hitting a
  recursion loop, as some of the properties of fronts are cycle references.
  There should be a fix in the Accessibility panel to _not_ pass fronts, but we
  also "fix" it from here by simply not building sub-properties for the object
  when we're in TINY mode.

Differential Revision: https://phabricator.services.mozilla.com/D81971
2020-07-02 15:07:12 +00:00
Nicolas Chevobbe
e19e7c943a Bug 1649710 - Fix EnvironmentFront constructor. r=jdescottes.
The constructor signature was wrong, as protocol.js calls it with a targetFront
instead of the expected "form".
The self-management isn't making much sense, and there's no need for this front
to be different than others.
test_framebindings-07.js, which was directly instantiating EnvironmentFronts is
modified to not do this anymore.
This allow us remove the getBindings method from the front, as it was only used
from this test.

Differential Revision: https://phabricator.services.mozilla.com/D81838
2020-07-01 13:31:31 +00:00
Stepan Stava
87e5663562 Bug 1647693 - Add sourceActorId to 'message' object for log points r=loganfsmyth
Makes `sourceId` available in  the `resource.message` object for log points from 'resourceWatcher' to better address sources than only by `fileName`.

Differential Revision: https://phabricator.services.mozilla.com/D80642
2020-06-30 18:31:32 +00:00
Hubert Boma Manilla
c6f4a0a285 Bug 1648373 - Add slow requests indicator r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D81629
2020-06-30 16:54:55 +00:00
Cosmin Sabou
4a382d7801 Backed out 4 changesets (bug 1640338, bug 1640778) for devtools failures on browser_dbg-toolbox-unselected-pause.js.
Backed out changeset 92cb02f03119 (bug 1640778)
Backed out changeset 6401dd804f28 (bug 1640338)
Backed out changeset cb4edb2627bb (bug 1640338)
Backed out changeset b2394d79f48f (bug 1640338)
2020-06-30 19:59:10 +03:00
Logan Smyth
bc1239373b Bug 1637883 - Bail on eager eval for same-compartment windows. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D81382
2020-06-29 05:17:59 +00:00
Brindusan Cristian
cb08871bb0 Backed out changeset 4237adea1a08 (bug 1648373) for dt failures at browser_webconsole_stubs_network_event.js. CLOSED TREE 2020-06-30 18:29:15 +03:00
Yura Zenevich
17dc33c60a Bug 1640778 - remove auto-init experiment code. r=mtigley,devtools-backward-compat-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D77057
2020-06-30 14:53:07 +00:00
Yura Zenevich
8c1725004b Bug 1640338 - simplify accessibility proxy startup since we no longer need to initialize it until the panel is opened. r=mtigley
Differential Revision: https://phabricator.services.mozilla.com/D77056
2020-06-30 14:53:07 +00:00
Hubert Boma Manilla
7cf3a162e6 Bug 1648373 - Add slow requests indicator r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D81629
2020-06-30 13:49:36 +00:00
Daisuke Akatsuka
de90f65570 Bug 1646974: Add a test for the stylesheet which is loaded as internal. r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D80807
2020-06-26 09:21:58 +00:00
Daisuke Akatsuka
14e2eb6c29 Bug 1646974: Introduce and use isInDevToolsContext flag. r=Honza,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80623
2020-06-29 09:34:54 +00:00
Razvan Maries
4b75bbe39d Bug 1618059 - Disabled test_extension_storage_actor.js on Windows. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D81406
2020-06-29 08:17:39 +00:00
Logan Smyth
48aeb2fe30 Bug 1644075 - Make sure that injected scripts have no URL. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D81376
2020-06-27 05:19:51 +00:00
Sebastian Zartner
63db1cbfbc Bug 1635970 - Extended support for XPath expressions in Inspector search. r=jdescottes
The limitation to expressions starting with a slash was lifted in order to allow searching via other possible XPath expressions like `id("foo")` or `(//div)[2]`.

Differential Revision: https://phabricator.services.mozilla.com/D80963
2020-06-25 18:32:40 +00:00
Nicolas Chevobbe
7089e9987d Bug 1646678 - Allow resource watcher tests to force server side support. r=ochameau.
This is done by getting the value of the `devtools.testing.enableServerWatcherSupport`
preference on the WatcherActor, and using its result to enable the traits or not.
On the browser_resources_* test that have both legacy and server listener, we
run the tests twice, without and with the pref to have some decent coverage.

Differential Revision: https://phabricator.services.mozilla.com/D79983
2020-06-25 08:59:58 +00:00
Nicolas Chevobbe
05d83bc5f9 Bug 1648022 - Unwatch resources on target destruction. r=ochameau.
This removes the unpopulated _resourceWatchers attributes from
the browsing context, and instead uses a new function on the
Resource module (`unwatchAllTargetResources`)

Differential Revision: https://phabricator.services.mozilla.com/D80834
2020-06-25 08:59:04 +00:00
Jan Odvarko
6799964058 Bug 1646960 - imported patch ignore-blocked-preloads.diff r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D80856
2020-06-25 10:54:15 +00:00
Nihanth Subramanya
0b44a1b2ab Bug 1645896 - Add a console log origins that have their cookies partitioned by dFPI. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D80675
2020-06-25 05:51:29 +00:00
Hubert Boma Manilla
21ef456a07 Bug 1647625 - Undo check for id or reason for block requests r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D80679
2020-06-24 12:01:27 +00:00
Yura Zenevich
064b6f0847 Bug 1598016 - make sure that remote frame highlighting works in browser toolbox. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D79404
2020-06-24 13:21:30 +00:00
Razvan Maries
592b80d333 Backed out changeset 7ff5210dae5e (bug 1645896) for build bustages. CLOSED TREE 2020-06-24 13:39:43 +03:00
Nihanth Subramanya
6be693b933 Bug 1645896 - Add a console log origins that have their cookies partitioned by dFPI. r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D80675
2020-06-24 10:11:45 +00:00
Nicolas Chevobbe
efe9743fe7 Bug 1495728 - Remove unused ActorPool class. r=ochameau.
This class isn't used anymore, and it's safe to remove it.
We take this as an opportunity to remove Pool#cleanup and
Pool#isEmpty, which each only had one callsite.
Some comments are updated to not mention ActorPool.

Differential Revision: https://phabricator.services.mozilla.com/D80602
2020-06-24 07:39:06 +00:00
Nicolas Chevobbe
a67f596fa2 Bug 1621713 - Don't create extra ActorPools in devtools/server. r=jdescottes.
Remove pools and make target actors manage themselves.
devtools/server/tests/browser/browser_navigateEvents.js was modified
since the targetActor can't be retrieved with `searchAllConnectionsForActor`
anymore.

Differential Revision: https://phabricator.services.mozilla.com/D67510
2020-06-24 07:38:09 +00:00
Julian Descottes
87467dc091 Bug 1644357 - Remove unused WebExtensionDescriptor properties isAPIExtension & type r=daisuke
Depends on D78009

Differential Revision: https://phabricator.services.mozilla.com/D78868
2020-06-09 10:09:09 +00:00
Julian Descottes
d412953eea Bug 1646456 - Only call destroy on top level pools from connection onClosed r=ochameau,nchevobbe
Depends on D80060

Differential Revision: https://phabricator.services.mozilla.com/D80064
2020-06-23 11:08:30 +00:00
Julian Descottes
4006b42e26 Bug 1646456 - Remove unused noCleanup argument from removeActorPool r=nchevobbe
Depends on D80059

removeActorPool is only called from one spot, which always passes the second optional argument as true.

Differential Revision: https://phabricator.services.mozilla.com/D80060
2020-06-22 12:54:26 +00:00
Julian Descottes
b1578fe35a Bug 1646456 - Add xpcshell test to check pool destruction when connection closes r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D80059
2020-06-23 10:13:59 +00:00
Butkovits Atila
afbfabf2f0 Backed out changeset b09c7ddea2a4 (bug 1646678) for causing leaks. CLOSED TREE 2020-06-23 11:06:54 +03:00
Nicolas Chevobbe
b5493ef467 Bug 1646678 - Allow resource watcher tests to force server side support. r=ochameau.
This is done by getting the value of the `devtools.testing.enableServerWatcherSupport`
preference on the WatcherActor, and using its result to enable the traits or not.
On the browser_resources_* test that have both legacy and server listener, we
run the tests twice, without and with the pref to have some decent coverage.

Differential Revision: https://phabricator.services.mozilla.com/D79983
2020-06-22 12:15:11 +00:00
Nicolas Chevobbe
1e9044a708 Bug 1646633 - Fix intermittent on browser_storage_cache_error.js. r=jdescottes,ochameau.
This patch removes the browsingContextID getter in favor of creating a property
on the instance in the constructor.
The getter was an attempt to handle the fact that we can have multiple browsing
context over time, but it wasn't working that well, so we'll tackle that as
part of Bug 1625027.

Differential Revision: https://phabricator.services.mozilla.com/D80151
2020-06-22 11:36:32 +00:00
Tooru Fujisawa
74dfbb2d11 Bug 1647026 - Disallow Array.prototype.fill in eager evaluation. r=loganfsmyth
Differential Revision: https://phabricator.services.mozilla.com/D80373
2020-06-20 18:59:52 +00:00
Hubert Boma Manilla
43efe182ba Bug 1646940 - block request only when there is a reason or an extension id r=Honza
Temp fix  should land in 79,  uplift to 78, and then remove from 79

Differential Revision: https://phabricator.services.mozilla.com/D80305
2020-06-19 09:36:50 +00:00
Dorel Luca
83762a1f31 Backed out changeset 40dae06d5e4d (bug 1646678) for Devtools failures in tests/browser_resources_several_resources.js. CLOSED TREE 2020-06-18 23:21:43 +03:00
Nicolas Chevobbe
06852fdbb6 Bug 1646678 - Allow resource watcher tests to force server side support. r=ochameau.
This is done by getting the value of the `devtools.testing.enableServerWatcherSupport`
preference on the WatcherActor, and using its result to enable the traits or not.
On the browser_resources_* test that have both legacy and server listener, we
run the tests twice, without and with the pref to have some decent coverage.

Differential Revision: https://phabricator.services.mozilla.com/D79983
2020-06-18 15:20:14 +00:00
Hubert Boma Manilla
12ac6882be Bug 1644275 - Add a new Channel map r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D79137
2020-06-18 14:44:12 +00:00
Alexandre Poirot
e5f625b56e Bug 1646143 - Use instantiable classes for resource watchers. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D79882
2020-06-18 10:34:37 +00:00
Nicolas Chevobbe
76fccc6721 Bug 1625910 - Use ResourceAPI for CSS Warning messages.r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D79069
2020-06-16 18:21:22 +00:00
Narcis Beleuzu
971e6397f2 Backed out changeset 9055fd940de5 (bug 1625910) for dt failures on browser_webconsole_location_styleeditor_link.js . CLOSED TREE 2020-06-16 20:52:43 +03:00
Nicolas Chevobbe
43bd5f2873 Bug 1646083 - Fix and add JsDoc in devtools/server/actors/descriptors/watcher/watcher.js. r=ochameau,jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D79847
2020-06-16 16:38:11 +00:00
Nicolas Chevobbe
0480240653 Bug 1644185 - Implement Platform Messages listening via the ResourceWatcher API on the actor side. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D79425
2020-06-16 16:37:52 +00:00
Nicolas Chevobbe
49bb11a38e Bug 1645334 - Handle parentProcessTargetActor in WatcherActor. r=jdescottes,ochameau.
In order to handle parentProcessTargetActor in the WatcherActor, we modify
TargetActorRegistry.getTargetActor to return the parent process target when
the passed browsing context id is null.

The comment explaining why we need to call getTargetActor in
WatcherActor#watchResources is modified to better summarize the situation.

We also take this as an opportunity to handle those targets in unwatchResources.

Differential Revision: https://phabricator.services.mozilla.com/D79424
2020-06-16 16:37:09 +00:00
Nicolas Chevobbe
ce5630b4f5 Bug 1625910 - Use ResourceAPI for CSS Warning messages.r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D79069
2020-06-16 10:29:03 +00:00
Kriyszig
a39858820c Bug 1637632 - Add browser tests for the CompatibilityActor r=mtigley,daisuke
Added browser test for CompatibilityActor to check consistency and
correctness.
Thse test include:
* Test for no issue
* Test for simple issue
* Test for invalid CSS rule
* Test for aliases
* Test for browser specific issues
* Test for multiple issues for same element

Differential Revision: https://phabricator.services.mozilla.com/D78956
2020-06-15 23:21:07 +00:00
Kriyszig
0d68d9f541 Bug 1637632 - Create a compatibility actor and connect it to Inspector's Compatibility panel r=mtigley,daisuke,devtools-backward-compat-reviewers
This patch adds a `CompatibilityActor` that calls the MDNCompatibility
library from the devtool server.
This patch exposes `_declarations` from the `StyleRuleActor` and the
a new function `formDeclaration` responsible for populating the
declarations property.
As a check for correctness, the patch replaces the `pageStyle.getApplied`
call in the Compatibility Panel on the client with `compatibility.getNodeCssIssues`
fetching the array of compatibility issues directly and removing the
dependency on MDNCompatibility library for client side computation of
compatibility issues.

Differential Revision: https://phabricator.services.mozilla.com/D77060
2020-06-10 09:09:00 +00:00
Emilio Cobos Álvarez
ffec6f608b Bug 1643656 - Remove prefers-color-scheme: no-preference. r=gl,remote-protocol-reviewers,hiro,whimboo
It was removed from the spec.

Differential Revision: https://phabricator.services.mozilla.com/D78834
2020-06-14 23:26:04 +00:00
Logan Smyth
25d491b792 Bug 1601179 - Enable async stacks but limit captured async stacks to debuggees. r=jorendorff,smaug
The 'asyncStack' flag on JS execution contexts is used as a general switch
to enable async stack capture across all locations in SpiderMonkey, but
this causes problems because it can at times be too much of a performance
burden to general and track all of these stacks.

Since the introduction of this option, we have only enabled it on Nightly
and DevEdition for non-mobile builds, which has left a lot of users unable
to take advantage of this data while debugging.

This patch enables async stack traces across all of Firefox, but introduces
a new pref to toggle the scope of the actual expensive part of async stacks,
which is _capturing_ them and keeping them alive in memory. The new pref
limits the capturing of async stack traces to only debuggees, unless an
explicit pref is flipped to capture async traces for all cases.

This means that while async stacks are technically enabled, and code could
manually capture a stack and pass it back to SpiderMonkey and see that stack
reflected in later captured stacks, SpiderMonkey itself and related async
DOM APIs, among others, will not capture stacks or pass them to SpiderMonkey,
so there should be no general change in performance by enabling the broader
feature itself, unless the user is actively debugging the page.

One effect of this patch is that if you have the debugger open and then close
it, objects that have async stacks associated with them will retain those
stacks and they will continue to show up in stack traces, no _new_ stacks
will be captured. jorendorff and I have decided that this is okay because
the expectation that the debugger fully revert every possible effect that it
could have on a page is a nice goal but not a strict requirement.

Differential Revision: https://phabricator.services.mozilla.com/D68503
2020-06-14 02:41:45 +00:00
Jason Laster
13a9ca307f Bug 1644808 - Remove references to wasmBinarySource. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D79165
2020-06-12 20:28:44 +00:00