Commit Graph
77 Commits
Author SHA1 Message Date
Alexandre Poirot 14e115ac28 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
Alexandre Poirot 2f92cbb0b2 Bug 1222047 - Cache root actor form on RootClient rather than Target object. r=yulia
Summary: Depends On D3314

Reviewers: yulia!

Tags: #secure-revision

Bug #: 1222047

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

MozReview-Commit-ID: 9zqIeJWznsb
2018-08-23 03:51:39 -07:00
Alexandre Poirot 667a499530 Bug 1222047 - Remove unused visible/hidden events on target. r=yulia
Tags: #secure-revision

Bug #: 1222047

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

MozReview-Commit-ID: DSH0UmPrlxR
2018-08-23 03:51:38 -07:00
sreeise f430885da6 Bug 1368199 - Replaced uses of 'defer' with 'new Promise' in the devtools/client/framework directory. r=jryans
MozReview-Commit-ID: CA1XPx90jwW
2018-07-03 02:16:31 -04:00
J. Ryan Stinnett 969d6f83ae Bug 1466534 - Centralize DevTools link handling. r=jdescottes
This adds a `openContentLink` helper meant for any link controlled by web
content.  If there is an associated toolbox open, the toolbox's tab is used to
supply a triggering principal for the link.

MozReview-Commit-ID: 45l5yAPGpZr
2018-06-11 23:42:19 -07:00
J. Ryan Stinnett e776322082 Bug 1466733 - Rename WebExtension parent actors. r=ochameau
MozReview-Commit-ID: 6utlvMrDIBT
2018-06-14 14:43:18 -07:00
Alexandre Poirot ee08ebcd6e Bug 1466691 - Replace callback style in favor of promise for TabClient methods. r=jryans
MozReview-Commit-ID: 6Is4O8KQhgY
2018-06-05 01:50:40 -07:00
J. Ryan Stinnett 41b2e9b425 Bug 1172897 - Rename WebExtensionChildActor to WebExtensionTargetActor. r=ochameau
MozReview-Commit-ID: FkALAZ5HYCe
2018-06-04 19:29:52 -05:00
J. Ryan Stinnett 035161b7df Bug 1172897 - Rename BrowserAddonActor to AddonTargetActor. r=ochameau
MozReview-Commit-ID: 4iI6BQaleJS
2018-06-04 18:37:02 -05:00
J. Ryan Stinnett 0cae81b452 Bug 1172897 - Rename WorkerActor to WorkerTargetActor. r=ochameau
MozReview-Commit-ID: 2Qakr1PHKNZ
2018-06-01 15:59:24 -05:00
J. Ryan Stinnett c6fd8c950e Bug 1172897 - Rename TabActor to BrowsingContextTargetActor. r=ochameau
MozReview-Commit-ID: LPTEx2h4F1o
2018-05-25 18:20:28 -05:00
Julian Descottes 82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
J. Ryan Stinnett 1eeead19ba Bug 1456274 - Remove local progress listener in DevTools target. r=ochameau
DevTools targets have used a local progress listener for a long time to track
tab navigation.  However, this is redundant with server side code that does the
same thing.

Removing this from the target reduces differences between local and remote
debugging.  It also simplifies one piece of the target, which is a massively
twisted module.

MozReview-Commit-ID: E7lm4GUFZQO
2018-04-23 19:09:40 -05:00
Dorel Luca 1ea59491fe Backed out 3 changesets (bug 1456274) for Linting failure. CLOSED TREE
Backed out changeset 707d5e397407 (bug 1456274)
Backed out changeset 97e8882d0343 (bug 1456274)
Backed out changeset 7cf34fe2036e (bug 1456274)
2018-04-26 01:28:33 +03:00
J. Ryan Stinnett a8afafadf3 Bug 1456274 - Remove local progress listener in DevTools target. r=ochameau
DevTools targets have used a local progress listener for a long time to track
tab navigation.  However, this is redundant with server side code that does the
same thing.

Removing this from the target reduces differences between local and remote
debugging.  It also simplifies one piece of the target, which is a massively
twisted module.

MozReview-Commit-ID: E7lm4GUFZQO
2018-04-23 19:09:40 -05:00
Belén Albeza 4bdddd9b7c Bug 1454895 - allow toolbox to call getProcess when debugging a local tab. r=jryans
MozReview-Commit-ID: 19bhk3Wn9qE
2018-04-19 17:56:02 +02:00
Nicolas Chevobbe 0a4a416719 Bug 1449931 - Remove old-event-emitter usage from devtools/shared/webconsole; r=bgrins.
MozReview-Commit-ID: HkbUm0XkeJs
2018-03-29 16:06:24 +02:00
J. Ryan Stinnett fe86270713 Bug 1446222 - Move DevTools frame startup to new dir. r=jdescottes
Move and rename the server's frame script that starts DevTools in remote frames
from `child.js` to `startup/frame.js`.  `connectToChild` also becomes the more
generic `connectToFrame`.  A few b2g-isms like "app" are also removed.

These code paths will likely change more as Site Isolation work continues, but
for now, we have this light cleanup to gather startup-related paths together.

MozReview-Commit-ID: El8a0OE99gZ
2018-03-19 18:53:46 -05:00
Nicolas Chevobbe f50726549e Bug 1382581 - Remove old-event-emitter usage from devtools/client/framework; r=bgrins.
MozReview-Commit-ID: 4oQJ3391H9S
2018-03-14 17:31:12 +01:00
J. Ryan Stinnett 8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Jan Odvarko a8272e5f00 Bug 1438482 - logErrorInPage should produce an error log; r=bgrins,jryans
MozReview-Commit-ID: Ly9kDNwGthG
2018-02-20 15:48:56 +01:00
Julian Descottes 21b6d9f77b Bug 1416711 - Add registerAllActors API;r=ochameau
Most of the codebase that needs to create a debugger server
can use a server with all actors registered.

Define an additional method registerAllActors to do that.

By previous implementations, all the call sites that were
using browser: true were indirectly using tab & root: true
as well. So all the call sites using browser: true have been
migrated to registerAllActors and the specific behavior of
the browser: true case has been removed. Passing browser:true
to registerActors now only registers browser specific actors.

MozReview-Commit-ID: F3sx71eGrdG
2017-11-13 21:22:15 +01:00
Julian Descottes 6e8668e849 Bug 1416711 - Stop guarding consumer calls to DebuggerServer.init();r=ochameau
DebuggerServer.init() already bails out if it was previously initialized
so we could avoid guarding the calls to init() with it everywhere.

Registering an actor module several times is also a noop as the Server
keeps a map of all the already registered modules and will bail out if
the module is already known.

MozReview-Commit-ID: 4ONLlx9253i
2017-11-13 21:04:43 +01:00
Nicolas Chevobbe fee723d060 Bug 1403895 - Remove devtools/shared/client/main.js; r=ochameau.
Remove the main file that we don't need anymore and modify all
the imports to target the specific file they now need.

MozReview-Commit-ID: 2uWjTnAMAU0
2017-09-29 15:24:14 +02:00
ZER0 d78f1c54ef Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 03:47:30 +02:00
Wes Kocher aa1caed330 Backed out changeset 58f678547059 (bug 1381542) for conflicting with the incoming m-c merge a=backout
MozReview-Commit-ID: 1wKVHbOAUdc
2017-08-10 18:23:14 -07:00
ZER0 c91b128704 Bug 1381542 - renamed "devtools/shared/event-emitter" in "devtools/shared/old-event-emitter"; r=ochameau
MozReview-Commit-ID: GkF8HcUg5u8
2017-08-11 02:43:47 +02:00
Tom Tromey b7ccf51b81 Bug 1385032 - add logErrorInPage to tab target in devtools; r=bgrins
This adds a method that can be called by the toolbox to log something to
the web console.

MozReview-Commit-ID: GpZtWwNVVGO
2017-07-07 12:53:32 -06:00
Sebastian Hengst e7a7a6d1ff Bug 1380867 - Add activeConsole to workerTargets: Add semicolon after return statement to make eslint happy. r=eslint-fix 2017-07-14 23:59:56 +02:00
Jason Laster f6c2a63907 Bug 1380867 - Add activeConsole to workerTargets. r=bgrins 2017-07-13 18:55:00 -04:00
Luca Greco 8c05041220 Bug 1300590 - Implement support for $0 and inspect bindings in devtools.inspectedWindow.eval. r=aswan,ochameau
MozReview-Commit-ID: CHuc57tfgzo
2017-02-15 14:54:50 +01:00
Luca Greco 7d53dd3164 Bug 1302702 - Shorter extension urls in addon debugger window title and frames list selector. r=ochameau
MozReview-Commit-ID: zMdiVPyBUR
2017-04-24 13:47:56 +02:00
Luca Greco c83cf0fb0e Bug 1302702 - Make WebExtension Addon Debugging oop-compatible. r=ochameau
This patch applies all the changes needed to the devtools actors
and the toolbox-process-window, to be able to debug a webextension
running in an extension child process (as well as a webextension
running in the main process).

The devtools actor used to debug a webextension is splitted into
3 actors:

- the WebExtensionActor is the actor that is created when the
  "root.listTabs" RDP request is received, it provides the addon
  metadata (name, icon and addon id) and two RDP methods:

  - reload: used to reload the addon (e.g. from the "about:debugging#addons" page)
  - connectAddonDebuggingActor: which provides the actorID of the actor
    that is connected to the process where the extension is running
    (used by toolbox-process-window.js to connect the toolbox to the needed
    devtools actors, e.g. console, inspector etc.)

- the WebExtensionParentActor is the actor that connects to the
  process where the extension is running and ensures that a
  WebExtensionChildActor instance is created and connected
  (this actor is only the entrypoint to reach the WebExtensionChildActor,
  and so it does not provide any RDP request on its own, it only connect
  itself to its child counterpart and then it returns the RDP "form" of
  the child actor, and the client is then connected directly to the
  child actor)

- the WebExtensionChildActor is the actor that is running in the same
  process of the target extension, and it provides the same requestTypes
  of a tab actor.

By splitting the WebExtensionActor from the WebExtensionParentActor, we are
able to prevent the RemoteDebuggingServer to connect (and create
instances of the WebExtensionChildActor) for every addon listed by
a root.listAddons() request.

MozReview-Commit-ID: L1vxhA6xQkD
2017-03-21 15:55:35 +01:00
Sebastian Hengst b0ca1e9b39 Backed out changeset 9b16857ca48d (bug 1302702) 2017-05-17 20:01:30 +02:00
Sebastian Hengst 213e3196bd Backed out changeset b5e20d92d062 (bug 1302702) 2017-05-17 20:01:17 +02:00
Luca Greco 4fc754dd2c Bug 1302702 - Shorter extension urls in addon debugger window title and frames list selector. r=ochameau
MozReview-Commit-ID: zMdiVPyBUR
2017-04-24 13:47:56 +02:00
Luca Greco 1ca317e6e2 Bug 1302702 - Make WebExtension Addon Debugging oop-compatible. r=ochameau
This patch applies all the changes needed to the devtools actors
and the toolbox-process-window, to be able to debug a webextension
running in an extension child process (as well as a webextension
running in the main process).

The devtools actor used to debug a webextension is splitted into
3 actors:

- the WebExtensionActor is the actor that is created when the
  "root.listTabs" RDP request is received, it provides the addon
  metadata (name, icon and addon id) and two RDP methods:

  - reload: used to reload the addon (e.g. from the "about:debugging#addons" page)
  - connectAddonDebuggingActor: which provides the actorID of the actor
    that is connected to the process where the extension is running
    (used by toolbox-process-window.js to connect the toolbox to the needed
    devtools actors, e.g. console, inspector etc.)

- the WebExtensionParentActor is the actor that connects to the
  process where the extension is running and ensures that a
  WebExtensionChildActor instance is created and connected
  (this actor is only the entrypoint to reach the WebExtensionChildActor,
  and so it does not provide any RDP request on its own, it only connect
  itself to its child counterpart and then it returns the RDP "form" of
  the child actor, and the client is then connected directly to the
  child actor)

- the WebExtensionChildActor is the actor that is running in the same
  process of the target extension, and it provides the same requestTypes
  of a tab actor.

By splitting the WebExtensionActor from the WebExtensionParentActor, we are
able to prevent the RemoteDebuggingServer to connect (and create
instances of the WebExtensionChildActor) for every addon listed by
a root.listAddons() request.

MozReview-Commit-ID: L1vxhA6xQkD
2017-03-21 15:55:35 +01:00
Tom Tromey 1fae2b4bb3 Bug 1349354 - remove now-unused source-map-service; r=jryans
MozReview-Commit-ID: umdc4XrpGf
2017-05-15 03:17:19 -06:00
J. Ryan Stinnett 1fe6338d4c Bug 1346854 - Delay network listening until toolbox open. r=ochameau
Once upon a time (bug 862341), we decided to enable network listening by
default in DevTools.

In a general sense, that's fine.  When you open a toolbox, we listen to that
tab and stop listening when the toolbox closes.

GCLI / Developer Toolbar is quite different, though.  It connects to the whole
browser.  This meant that enabling GCLI would start listening to network
activity in *every* tab (even though it doesn't have any way to even use that
data).  This of course will slow down performance with all the extra tracking
and eat up memory with the tracked request data.

In this change, we move the step to enable network listening into the toolbox,
which seems more like what we intended anyway.

MozReview-Commit-ID: 2UYoQtWCAE1
2017-03-23 14:34:37 -05:00
J. Ryan Stinnett 0ec08eee8e Bug 1352157 - Avoid listTabs for global actors. r=ochameau
Adds a new `getRoot` request to the root actor which lists the global actors
only (leaving out the tabs).  This is a much better fit for callers who want to
access some global actor only, since it avoids visiting every tab, which could
be a very expensive operation.

MozReview-Commit-ID: 1lIAuaV7zoF
2017-04-06 23:00:22 -05:00
J. Ryan Stinnett f60efe3dc8 Bug 1275078 - Fix ESLint issues in toolbox and target files. r=ochameau
MozReview-Commit-ID: 8SoQ2JnTib3
2017-02-22 12:33:20 -06:00
Luca Greco ae5eba4028 Bug 1291737 - Export TabTarget from 'devtools/client/framework/target' module. r=ochameau
MozReview-Commit-ID: D2CeRH74Vg8
2016-09-05 14:19:50 +02:00
Carsten "Tomcat" Book 88743960b8 Backed out changeset 235ba91834d5 (bug 1291737) 2017-01-19 16:59:20 +01:00
Luca Greco 295264723f Bug 1291737 - Export TabTarget from 'devtools/client/framework/target' module. r=ochameau
MozReview-Commit-ID: D2CeRH74Vg8
2016-09-05 14:19:50 +02:00
Alexandre Poirot 023f7a37d6 Bug 1323466 - Prevent loading webbrowser.js in child process. r=jryans
MozReview-Commit-ID: J1EmwxplNhA

Make actor registration more explicit and documented.
Each codepath depends on various set of actors, and it may be confused
as we often register actors if the DebuggerServer wasn't initialized yet.
But it is often already started by some other callsite...

This changeset also converts childtab to being just a module
and stop using DebuggerServer.addActors magic.
2016-12-19 03:14:12 -08:00
J. Ryan Stinnett 16edeff0d2 Bug 1316736 - Clean up RDM typos. r=ochameau
MozReview-Commit-ID: 4waiXuzrQDE
2016-11-09 18:38:28 -06:00
Alexandre Poirot 0d77c0893d Bug 1068400 - Restore toolbox when switching from in-parent-process to OOP tab. r=jryans
MozReview-Commit-ID: K51gp7PavC7
2016-10-24 07:37:23 -07:00
Alexandre Poirot 86da11cb16 Bug 1302148 - Nullify attributes on destroy to prevent leaking the toolbox. r=bgrins
MozReview-Commit-ID: AUsgbyi9KNQ
2016-09-12 03:21:40 -07:00
Alexandre Poirot b38e2f3feb Bug 1243452 - Make DebuggerClient.close return a Promise. r=jryans
MozReview-Commit-ID: 26PNAS431Hc
2016-08-31 09:39:42 -07:00
2d7d4468a6 Bug 1281040 - Make sure we detach from worker client when target is destroyed. r=jlongster 2016-08-08 07:53:37 +02:00