Commit Graph
28 Commits
Author SHA1 Message Date
Alexandre Poirot a5717331be Bug 1879087 - [devtools] Avoid exception on page reload with the tracer enabled. r=devtools-reviewers,nchevobbe
For some unexplained reason, `conn` could be null.

Differential Revision: https://phabricator.services.mozilla.com/D201975
2024-02-22 08:52:20 +00:00
Alexandre Poirot 8ae9b24f22 Bug 1816635 - [devtools] Move conn nullification to Pool. r=jdescottes
So that it isn't only done for Actors, but also for all Fronts.

Differential Revision: https://phabricator.services.mozilla.com/D169800
2023-02-14 14:47:17 +00:00
Alexandre Poirot 07e6ce0083 Bug 1792848 - [devtools] Use absolute URLs to import modules in devtools/shared. r=Honza,devtools-backward-compat-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D158643
2022-10-12 15:56:22 +00:00
Nicolas Chevobbe c30f1e8099 Bug 1755645 - [devtools] Don't unmanage actor if its "old" parent is the same as the "new" one. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D138881
2022-02-16 10:43:55 +00:00
Julian Descottes b4379f28ba Bug 1717580 - [devtools] Actor/Front isDestroyed should not return true for uninitialized objects r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D118469
2021-06-23 15:28:33 +00:00
Alexandre Poirot ce54040455 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
Nicolas Chevobbe 70e7c68418 Bug 1684965 - [devtools] Manage a reference to the parent in Pool. r=ochameau.
At the moment, the `getParent` method was using the connection `poolFor` method
to retrieve the pool that was managing it. This is quite costly as `poolFor`
loops through all the pools of the connection.
This patch adds a `parentPool` property to the Pool that is set in `manage` and
reset in `unmanage`, and used in the `getParent` method.
This speeds up getParent as well as the methods that call it (`manage` when the
actor was already managed, and `destroy`).

Differential Revision: https://phabricator.services.mozilla.com/D100981
2021-01-07 15:35:50 +00:00
Nicolas Chevobbe 6d31eeb842 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 a1d55c9cf5 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
Julian Descottes 34ae8de079 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 a0145e6ba0 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
Jason Laster a936c33489 Bug 1622116 - Add a helper for visualizing server pools. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D66687
2020-04-08 17:33:12 +00:00
Julian Descottes 02f106f32e Bug 1602468 - Skip destroy for object fronts on Toolbox destroy r=ochameau,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D56546
2020-03-25 09:28:06 +00:00
Narcis Beleuzu 265fc14f8f Backed out changeset 4aa0213b5603 (bug 1602468) for dt failures on framework/toolbox.js . CLOSED TREE 2020-03-24 23:41:31 +02:00
Julian Descottes 5f14b1a57e Bug 1602468 - Skip destroy for object fronts on Toolbox destroy r=ochameau,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D56546
2020-03-24 16:47:54 +00:00
Nicolas Chevobbe ed84972fa1 Bug 1623079 - Add a label parameter to the Pool constructor. r=jdescottes.
This is similar to what we already have in ActorPool.
We would be able to surface this information to have
a better view of our different pools.

Differential Revision: https://phabricator.services.mozilla.com/D67161
2020-03-18 06:30:05 +00:00
Nicolas Chevobbe d127646083 Bug 1467565 - Replace all remaining actorPrefix properties. r=ochameau.
With all our actors supporting protocol.js, we can remove
support for the pre-protocol.js actorPrefix property.

Differential Revision: https://phabricator.services.mozilla.com/D66604
2020-03-16 17:37:00 +00:00
Nicolas Chevobbe 8648a90536 Bug 1620288 - Rename Pool#parent to getParent. r=ochameau.
This makes it more obvious that it's a function, and not
a property.

Differential Revision: https://phabricator.services.mozilla.com/D66603
2020-03-16 17:34:32 +00:00
Nicolas Chevobbe 292c52c1d3 Bug 1619214 - Use parentFront to retrieve parent when possible. r=ochameau.
In fronts there's a parentFront  property that maintain the link
between a front and its parent.
But Pool isn't using it, and retrieve the parent through poolFor,
which can be a bit slow depending the number of pools and their size.

This patch makes Fronts override the Pool#parent method to retrive the
parent from the parentFront property.

Differential Revision: https://phabricator.services.mozilla.com/D64921
2020-03-16 17:38:09 +00:00
Jason Laster 7eb986e407 Bug 1620025 - Improve source front management. r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D65803
2020-03-13 20:04:49 +00:00
Alexandre Poirot 35634f4f44 Bug 1614792 - Rename DebuggerClient to DevToolsClient. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D62495
2020-02-17 13:39:25 +00:00
Alexandre Poirot 1ea1a546f1 Bug 1614791 - Rename DebuggerServer to DevToolsServer. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D61363
2020-02-17 10:28:24 +00:00
Alexandre Poirot e4582cd9a0 Bug 1609716 - Unify xpcshell test folders in devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60160
2020-01-20 13:56:04 +00:00
Cosmin Sabou eb2d2dd49c Backed out changeset ccd058375096 (bug 1609716) for devtools failures on browser_device_custom_remove. CLOSED TREE 2020-01-20 18:11:34 +02:00
Alexandre Poirot f2e7460a19 Bug 1609716 - Unify xpcshell test folders in devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60160
2020-01-20 13:56:04 +00:00
Victor Porof 435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Julian Descottes 9f30cc17b0 Bug 1562583 - Add license headers in devtools/shared/protocol files r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D36480
2019-07-03 18:00:30 +00:00
Jason Laster 698c6ed151 Bug 1560445 - Extract classes from protocol.js. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D35502
2019-06-26 15:53:20 +00:00