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

73 Коммитов

Автор SHA1 Сообщение Дата
Alexandre Poirot a0066e8731 Bug 1515862 - Remove Front's form argument. r=jdescottes
Now that form argument is no longer used by any front to set its actor ID,
we can remove this argument.

Have a particular look at:
* devtools/client/shared/test/test-actor-registry.js
which was the last Front to be manually instantiated and need some tweaks,
* canvas head.js to create canvas front via getFront,
* RDM manager.js, which requires the EmulationFront to be self managed.

Depends on D17615

Differential Revision: https://phabricator.services.mozilla.com/D17616

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:52 +00:00
Alexandre Poirot 9a08694477 Bug 1515862 - Set global and target scope front IDs from getFront helper. r=jdescottes
Ideally, formAttributeName would be a field on the prototype of each front,
but unfortunately, Firefox doesn't support ES Class's fields yet. So it is
put as an instance attribute instead.

This patch streamline the manually set actorID and the retrieval of actor ID
from root or target front's form into `getFront` helper method.
So that all the specific related to the lazy actor is now inside of this helper.
It also moves the special "this.manage(this)" to this helper.
We might be able to followup on this one and finally have only the root front
being self managed. But the initialize method makes it hard.

Note the special tweak made to devtools/client/responsive.html/manager.js
Hopefully this can be removed once the target classes are merged.

Depends on D15832

Differential Revision: https://phabricator.services.mozilla.com/D17615

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:50 +00:00
Alexandre Poirot 9db10d1d30 Bug 1515862 - Remove form passed as Front constructor. r=jdescottes
Only a couple of special cases where expecting to pass a full form object
as Front's second constructor argument.
Refactor them to ensure calling Front's form method instead in order to align
with typical protocol.js's behavior.

Depends on D17614

Differential Revision: https://phabricator.services.mozilla.com/D15832

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:48 +00:00
Alexandre Poirot 4199139118 Bug 1515862 - Remove detail feature from protocol.js. r=jdescottes
This feature is only used by node and domrulestyle actors and that, only for actor ID.
Instead of this, support this "pass only actor ID rather than full form" feature
in a more dedicated way.

We might followup on that to clarify/simplify doing this: passing only the actor ID
rather than its full form.

Depends on D17613

Differential Revision: https://phabricator.services.mozilla.com/D17614

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:46 +00:00
Alexandre Poirot d028804ade Bug 1515862 - Remove unecessary usages of actorid checks in actor and front's form method. r=jdescottes
Remove all actorid checks in actors and fronts as we never pass a defined `detail` argument in them.
Only domstylerule and node are using detail and that, always with detail="actorid".
Also remove ctx and detail in Front constructor as that's not used by these two actors.

Depends on D17612

Differential Revision: https://phabricator.services.mozilla.com/D17613

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:39 +00:00
Alexandre Poirot 385ac7de96 Bug 1515862 - Remove protocol.js's formType. r=jdescottes
None of our actor define a `formType` in its specification.
This feature has never been used, so remove it and its test.

Differential Revision: https://phabricator.services.mozilla.com/D17612

--HG--
extra : moz-landing-system : lando
2019-01-28 18:42:33 +00:00
Alexandre Poirot e5a27afe74 Bug 1512154 - Convert protocol.js to es classes. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D14840

--HG--
extra : moz-landing-system : lando
2019-01-02 13:38:54 +00:00
Alexandre Poirot 10ba88604c Bug 1515116 - Let Front's constructor set the actorID instead of doing it manually. r=jdescottes
Depends on D14915

Differential Revision: https://phabricator.services.mozilla.com/D14916

--HG--
extra : moz-landing-system : lando
2019-01-03 10:20:35 +00:00
yulia 1cd5e24aeb Bug 1514197 - add clearEvents method to the event emitter and call from Front.destroy; r=jdescottes
details about what is going on here is in the bug thread

Differential Revision: https://phabricator.services.mozilla.com/D14547

--HG--
extra : moz-landing-system : lando
2018-12-14 17:34:53 +00:00
Alexandre Poirot 37fcc38aa4 Bug 1510949 - Make protocol.js support es6 classes for fronts. r=yulia
MozReview-Commit-ID: JegR2JsyNrI

Differential Revision: https://phabricator.services.mozilla.com/D13780

--HG--
extra : moz-landing-system : lando
2018-12-11 16:32:41 +00:00
Julian Descottes ca974ee77d Bug 1507125 - Protocol Front should throw when called after destroy;r=ochameau
Depends on D13137.

Differential Revision: https://phabricator.services.mozilla.com/D13138

--HG--
extra : moz-landing-system : lando
2018-11-29 10:00:06 +00:00
Narcis Beleuzu 9529070146 Backed out 2 changesets (bug 1507125) for ESlint failure on runtimes.js . CLOSED TREE
Backed out changeset 2b9aaf2f3b58 (bug 1507125)
Backed out changeset 641de22d6480 (bug 1507125)

--HG--
extra : rebase_source : a8338286873050d9636dc6c801f61c7c456e10fd
2018-11-28 19:58:15 +02:00
Julian Descottes 9c97680ee1 Bug 1507125 - Front should throw when sending packet without actorID or destination;r=ochameau
Depends on D13137. I could use help to write the test in a better.
I believe there is a cleaner way to create the front here?
I also had other suggestions for making the fronts more robust in the bug.
Let me know if you think I should try to investigate them more.

Differential Revision: https://phabricator.services.mozilla.com/D13138

--HG--
extra : moz-landing-system : lando
2018-11-28 17:36:25 +00:00
Alexandre Poirot 78e2ca28f0 Bug 1506549 - Introduce API to listen for new child fronts of a given type. r=yulia
MozReview-Commit-ID: EKWTGhGo0VM

Depends on D11624

Differential Revision: https://phabricator.services.mozilla.com/D11625

--HG--
extra : moz-landing-system : lando
2018-11-15 10:23:00 +00:00
Alexandre Poirot 5eed35c08e Bug 1506549 - Stop returning the actor from Pool.manage. r=yulia
This was only used by test and isn't much useful.

MozReview-Commit-ID: DeIimVmMOOs

Depends on D11623

Differential Revision: https://phabricator.services.mozilla.com/D11624

--HG--
extra : moz-landing-system : lando
2018-11-15 10:22:58 +00:00
Andreea Pavel b1857361c4 Backed out 5 changesets (bug 1506549) for failing devtools at devtools/client/aboutdebugging/test/browser_service_workers_status.js on a CLOSED TREE
Backed out changeset 6be66dea928c (bug 1506549)
Backed out changeset da0d76d0e8fc (bug 1506549)
Backed out changeset 490eeba8f9f7 (bug 1506549)
Backed out changeset 97554f465eca (bug 1506549)
Backed out changeset 4f259de6cce0 (bug 1506549)
2018-11-14 21:46:07 +02:00
Alexandre Poirot 84741845ef Bug 1506549 - Introduce API to listen for new child fronts of a given type. r=yulia
MozReview-Commit-ID: EKWTGhGo0VM

Depends on D11624

Differential Revision: https://phabricator.services.mozilla.com/D11625

--HG--
extra : moz-landing-system : lando
2018-11-14 16:20:57 +00:00
Alexandre Poirot 65f24f315e Bug 1506549 - Stop returning the actor from Pool.manage. r=yulia
This was only used by test and isn't much useful.

MozReview-Commit-ID: DeIimVmMOOs

Depends on D11623

Differential Revision: https://phabricator.services.mozilla.com/D11624

--HG--
extra : moz-landing-system : lando
2018-11-14 15:48:20 +00:00
Alexandre Poirot fffd078e5c Bug 1506545 - Stop overloading Pool.actor from Front class. r=yulia
Front.actor custom implementation is only used from Front class and doesn't match Pool's one behavior.
Front users would expect to see the one from Pool as it inherits from it.

MozReview-Commit-ID: 8plo2K5kEWq

Differential Revision: https://phabricator.services.mozilla.com/D11614

--HG--
extra : moz-landing-system : lando
2018-11-13 14:22:24 +00:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
yulia 4448c52661 Bug 1495387 - introduce async front instantiation; r=ochameau
Depends on D8989

Differential Revision: https://phabricator.services.mozilla.com/D8990

--HG--
extra : moz-landing-system : lando
2018-10-18 14:34:33 +00:00
Alexandre Poirot 9c441aadb9 Bug 1485660 - Avoid exceptions when the connection is closed in middle of the actor's id retrieval. r=jdescottes
MozReview-Commit-ID: KvwkISz7OVe

Depends on D7456

Differential Revision: https://phabricator.services.mozilla.com/D7457

--HG--
extra : moz-landing-system : lando
2018-10-15 08:36:05 +00:00
Brindusan Cristian c328bc1cdf Backed out 8 changesets (bug 1485660) for damp failures on front.hasRequests. CLOSED TREE
Backed out changeset 7a2f29bbe2a8 (bug 1485660)
Backed out changeset 26e82fa62444 (bug 1485660)
Backed out changeset 9bb2f56f219d (bug 1485660)
Backed out changeset 40a3c2dd1b38 (bug 1485660)
Backed out changeset cfb160882db9 (bug 1485660)
Backed out changeset 3642f2d66777 (bug 1485660)
Backed out changeset 9026679753b2 (bug 1485660)
Backed out changeset dccca441b980 (bug 1485660)
2018-10-11 22:33:35 +03:00
Alexandre Poirot e98e7b66be Bug 1485660 - Avoid exceptions when the connection is closed in middle of the actor's id retrieval. r=jdescottes
MozReview-Commit-ID: KvwkISz7OVe

Depends on D7456

Differential Revision: https://phabricator.services.mozilla.com/D7457

--HG--
extra : moz-landing-system : lando
2018-10-11 15:46:24 +00:00
yulia c6dbe43c8e Bug 1473513 - reduce number of poolFor calls; r=ochameau
Summary:
MozReview-Commit-ID: 9VqKPauAP9j

Depends on D6475

Reviewers: ochameau

Reviewed By: ochameau

Bug #: 1473513

Differential Revision: https://phabricator.services.mozilla.com/D6476

--HG--
extra : rebase_source : 1bebc34bf805dfcf7bce0b5d8f3a2a13bab11173
2018-09-26 10:08:10 +02:00
yulia 4a8f74eb3e Bug 1473513 - create LazyActorClass based off ObservedActorFactory and RegisterdFactory classes for use in RootActor and BrowsingContextActor; r=ochameau
Summary:
create LazyActorClass based off ObservedActorFactory and RegisterdFactory classes for use in RootActor and BrowsingContextActor;

Depends on D6468

Reviewers: ochameau

Reviewed By: ochameau

Bug #: 1473513

Differential Revision: https://phabricator.services.mozilla.com/D6470

--HG--
rename : devtools/server/actors/common.js => devtools/shared/protocol/lazy-pool.js
extra : rebase_source : 09a1c8eac3cbb5856a5e3e61a1c0540efe32e5bd
2018-09-26 10:03:33 +02:00
yulia 7caf289dbe Bug 1473513 - use Protocol.js pools for workerTargetActorPool in Target Actors; r=ochameau
Summary: MozReview-Commit-ID: 5uIWwOR7CHp

Reviewers: ochameau

Reviewed By: ochameau

Bug #: 1473513

Differential Revision: https://phabricator.services.mozilla.com/D6468

--HG--
extra : rebase_source : b5f560e404727a168c5b35924961a49c51b849df
2018-09-26 10:02:54 +02:00
Alexandre Poirot 249c49e788 Bug 1026583 - Avoid sending events for already destroyed actors. r=yulia
Reviewers: yulia!

Tags: #secure-revision

Bug #: 1026583

Differential Revision: https://phabricator.services.mozilla.com/D4329

MozReview-Commit-ID: 3485VTbMRqO
2018-08-28 05:42:32 -07:00
Alexandre Poirot e4bf7ca110 Bug 1222047 - Expose helper to easily instanciate global and target scoped fronts. r=yulia
Summary: Depends On D3314

Tags: #secure-revision

Bug #: 1222047

Differential Revision: https://phabricator.services.mozilla.com/D3316

MozReview-Commit-ID: fqlHCkOtIB
2018-08-23 03:51:39 -07:00
Nicolas Chevobbe d808bc13f0 Bug 1450944 - Throw in actor methods instead of returning an error packet; r=ochameau.
Since protocol.js catches exceptions and returns an appropriate
packet as a result, we can use this instead of returning manually
an error packet.

MozReview-Commit-ID: 6lREam5sEVs

--HG--
extra : rebase_source : dcc87d659281b909fe973da33b13b9a655d9d300
2018-05-17 15:04:24 +02:00
J. Ryan Stinnett eaa4969e77 Bug 1172897 - Rename TabActor to BrowsingContextTargetActor. r=ochameau
MozReview-Commit-ID: LPTEx2h4F1o

--HG--
rename : devtools/server/actors/tab.js => devtools/server/actors/targets/browsing-context.js
rename : devtools/shared/specs/tab.js => devtools/shared/specs/targets/browsing-context.js
extra : rebase_source : e62720693ad492cdfb68ab21af1f54d78e85123a
2018-05-25 18:20:28 -05:00
Julian Descottes 640fe52298 Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4

--HG--
extra : rebase_source : 65de1b0aba412d9044b5196115f74276caa058f2
2018-06-01 12:36:09 +02:00
Alexandre Poirot 191bf836a1 Bug 1458731 - Print actor's typeName and name of the throwing method when an exception is thrown by a protocol.js's actor. r=jlast,jryans
MozReview-Commit-ID: 5poQ0F1dJVu

--HG--
extra : rebase_source : dcf0cb83559fec2e3f92fe777a3bb630e098f7d4
2018-05-09 03:44:54 -07:00
Alexandre Poirot eb823e257d Bug 1460229 - Throw an explicit error message when a method specified in a spec is missing in the actor. r=jryans
MozReview-Commit-ID: JdsCMh93xZE

--HG--
extra : rebase_source : 5b7185ce8527edb9880fb619706ab323c5a172f7
2018-03-28 01:08:06 -07:00
Alexandre Poirot 93856a5ce8 Bug 1459205 - Speed up dict type by preventing duplicated calls to `getType` from its write method. r=jryans
MozReview-Commit-ID: Dn37LGEpB6q

--HG--
extra : rebase_source : 11cf83fdc1dba6d8b13c9440adf1e6d1d2b6d554
2018-05-03 12:47:27 -07:00
Alexandre Poirot f44b62f9b3 Bug 1454899 - Prevent request arguments duplication on each request call. r=jryans
MozReview-Commit-ID: GaLM6LsCoWp

--HG--
extra : rebase_source : cd2d5a9cf756ebf29050490145851f1b9afc8aa1
2018-04-05 10:00:02 -07:00
yulia bb64c024ae Bug 1450948 - collect actorSpecs in a weakmap. r=ochameau
MozReview-Commit-ID: 7O4edWRb7cF

--HG--
extra : rebase_source : 80421fa98d9f988cf0b73508a811b41568012465
2018-04-25 14:46:44 +02:00
yulia 318a381a6e Bug 1450948 - Convert ChromeActor to protocol.js r=ochameau
MozReview-Commit-ID: 1pwYUXGiEdT
* fix types in tab.js

MozReview-Commit-ID: 2PAU8IeEKDV

--HG--
extra : rebase_source : 4003f1c84108aed4f37bca2d3c8cfb32d5ac40e9
2018-04-24 15:30:38 +02:00
Alexandre Poirot c3e6358671 Bug 1455437 - Prevent multiple Map query by simplifying _sendEvent method. r=jryans
MozReview-Commit-ID: H5ora5qsunx

--HG--
extra : rebase_source : 0d5f044a9af96940762ba838aa4dade95ce9344b
2018-04-18 15:42:37 -07:00
Alexandre Poirot c0429f7ad9 Bug 1455437 - Inline isIterator helper in protocol.js. r=jryans
MozReview-Commit-ID: DLoXENvbKOe

--HG--
extra : rebase_source : f4b9c4b0401da2f287645d592794c2be748bbb7e
2018-04-18 15:31:30 -07:00
Alexandre Poirot db050d4da5 Bug 1454792 - Prevent duplicating arrays in Array type's read/write methods. r=jryans
MozReview-Commit-ID: 82GYGZUs6TH

--HG--
extra : rebase_source : ba3b473ef5211cc0fa9901db5d193ef147035dcc
2018-04-05 09:23:09 -07:00
Alexandre Poirot f54b783d68 Bug 1454792 - Use arrow functions instead of bind in protocol.js. r=jryans
MozReview-Commit-ID: 8pOL86G3ff5

--HG--
extra : rebase_source : 433d9a1fad24e46e8fca00037f206a5954d535e1
2018-04-16 09:30:43 -07:00
Alexandre Poirot 5a17a2dae8 Bug 1454792 - Stop duplicating arrays in protocol.js's identifyWrite function. r=jryans
MozReview-Commit-ID: LTgw12JInh9

--HG--
extra : rebase_source : 6b6b3a5b9a161280ea4c3d6e0a5949068127ce15
2018-04-05 09:14:09 -07:00
Alexandre Poirot 7abf7f83b4 Bug 1454373 - Switch protocol.js to native promises. r=jryans
MozReview-Commit-ID: ALifNayHJJG

--HG--
extra : rebase_source : 4f1a2ee628785850e1b4ca406d5f4c10d3ce6262
2018-04-13 14:34:12 -07:00
Narcis Beleuzu e270752f86 Backed out 2 changesets (bug 1454373) for mochitest devtools failures on devtools/client/shadereditor/test/browser_se_*. CLOSED TREE
Backed out changeset 4ec712f0aa13 (bug 1454373)
Backed out changeset b2ada4fddfa0 (bug 1454373)
2018-04-17 17:30:28 +03:00
Alexandre Poirot ed18236e36 Bug 1454373 - Switch protocol.js to native promises. r=jryans
MozReview-Commit-ID: ALifNayHJJG

--HG--
extra : rebase_source : a2150371f2109c96b6d84bd885a269d47f11e9dd
2018-04-13 14:34:12 -07:00
Alexandre Poirot 23fc8b9e3c Bug 1453385 - Make protocol.js throw if a spec implements a nested response object. r=jryans
MozReview-Commit-ID: 7TXQMvYzGDG

--HG--
extra : rebase_source : bbba7982bef0b0843fd5e2406126e644294a4265
2018-04-12 16:06:10 -07:00
Alexandre Poirot b76a7cf225 Bug 1453385 - Prevent protocol.js from copying all response objects. r=jryans
MozReview-Commit-ID: 5suOD9UmIr

--HG--
extra : rebase_source : 549937e54581d9c5b69e05351b88805e244cb622
2018-04-09 12:45:17 -07:00
J. Ryan Stinnett 23ff4cc75d Bug 1443081 - Apply spacing via `eslint --fix` for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
J. Ryan Stinnett d5abe62be4 Bug 1432496 - Clean up protocol.js deprecations. r=jdescottes
`ActorClass` and `FrontClass` are depercated protocol.js APIs that were left in
place to support add-ons that might have used them.  Now that we're in an
WebExtensions only mode, it seems safe to remove these.

MozReview-Commit-ID: HRKMPTIktrZ

--HG--
extra : rebase_source : 8118b7f87dae92688a0ace0f4cf05a2a0d609d6f
2018-01-23 09:15:49 -06:00