Commit Graph

34 Commits

Author SHA1 Message Date
Brian Hackett
4d9930a53d Bug 1586468 Part 2 - Use observer service to listen for content process connects/disconnects, r=ochameau.
Depends on D48260

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

--HG--
extra : moz-landing-system : lando
2019-10-09 21:17:44 +00:00
Alexandre Poirot
3e4fdd2d31 Bug 1583252 - Shutdown content process DebuggerServer only once the last connection closes. r=jdescottes
When multiple DebuggerClients starts debugging the same content process target,
the first one to close will destroy the other one as we destroy the server
and the loader as soon as we receive the debug:content-process-destroy message.
We should destroy them only once the last client closes.
i.e. when the last connection registered in the content process is destroyed.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 16:24:36 +00:00
Tom Ritter
61213de3b1 Bug 1582577 - Refactor a data: loadProcessScript from DevTools r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D46954

--HG--
extra : moz-landing-system : lando
2019-09-24 15:24:33 +00:00
Nicolas Chevobbe
8be561cece Bug 1577798 - Don't create a new Debugger instance in WebConsoleActor. r=ochameau,jlast.
Previously, when creating a new WebConsoleActor, we were
also creating a new Debugger instance.
The problem was that we would never call `enable` on it,
which is what allows to create debuggee for all existing
globals, and for the ones that will be created after.
This means that we had multiple workaround to get a
global debuggee, and in the case of function, would add
a global as a debuggee only to get its script location.

This patch remove the creation of the new Debugger,
and retrieve the parent actor Debugger instance instead.

This shuffles things around a bit, are the Debugger instance
was created by the ThreadActor, but is now by the target
actor (BrowsingContext, ContentProcess, ...).

We can then remove the now unused `getGlobalDebugObject`
hooks we were using in the Function previewer, as we
get a proper Debugger object, with the script location.

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

--HG--
extra : moz-landing-system : lando
2019-09-16 12:12:22 +00:00
Julian Descottes
2646ae9c6d Bug 1577092 - Remove connectTo* helpers in debugger-server and use connectors directly r=nchevobbe
Depends on D43728

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

--HG--
extra : moz-landing-system : lando
2019-08-28 13:07:56 +00:00
Julian Descottes
3df7a88f3b Bug 1572390 - Split main.js in debugger-server and debugger-server-connection r=yulia,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D41009

--HG--
rename : devtools/server/main.js => devtools/server/debugger-server-connection.js
rename : devtools/server/main.js => devtools/server/debugger-server.js
extra : moz-landing-system : lando
2019-08-08 12:44:13 +00:00
jaril
32e32e8cea Bug 997119 - Move ThreadActor logic from BrowsingContext. r=yulia
Differential Revision: https://phabricator.services.mozilla.com/D36554

--HG--
extra : moz-landing-system : lando
2019-07-30 00:05:04 +00:00
Alexandre Poirot
438498ee47 Bug 1566457 - Remove unused provider logic from Loader.jsm. r=jdescottes
We used to have another provider which would load module via file:// URI,
directly from the disk. But the progress on artifact builds and ./mach build faster
made this obsolete and has been removed a long time ago.
We still have a lot of abstraction to support this non-existent feature.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 12:25:05 +00:00
Victor Porof
24d2c75470 Bug 1561435 - Format devtools/server/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : d2dc183b9bf9086d4b862e0e9a0cfa0bf773193f
2019-07-05 11:26:00 +02:00
Cosmin Sabou
00f3836a87 Merge mozilla-inbound to mozilla-central. a=merge 2019-02-28 12:57:50 +02:00
Julian Descottes
235dde6c92 Bug 1528276 - Do not destroy the DebuggerServer in non-e10s when last frame connection is closed r=ochameau
When reviewing https://bugzilla.mozilla.org/show_bug.cgi?id=1521052 I did not think about Firefox for Android which is not using e10s.
This means the main DebuggerServer will be killed when there are no connections left. Happy to discuss more about the preferred solution.
This is a regression in 66 and I hope to uplift a fix for this.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 19:17:37 +00:00
Brian Hackett
a342374c62 Bug 1527203 Part 2 - Prevent worker debuggee execution until the thread actor has attached, r=ochameau.
--HG--
extra : rebase_source : 00d301909314379c3667af456579f9dbf0b47016
2019-02-12 13:05:34 -10:00
Brindusan Cristian
73b09a782e Backed out changeset c300840573f5 (bug 1528276) for dt failures at browser_target_server_compartment.js. CLOSED TREE
--HG--
extra : histedit_source : b43e057c5f78805a5a09afd84836e537fc726618
2019-02-26 19:45:30 +02:00
Julian Descottes
ecf2b4ff49 Bug 1528276 - Do not destroy the DebuggerServer in non-e10s when last frame connection is closed r=ochameau
When reviewing https://bugzilla.mozilla.org/show_bug.cgi?id=1521052 I did not think about Firefox for Android which is not using e10s.
This means the main DebuggerServer will be killed when there are no connections left. Happy to discuss more about the preferred solution.
This is a regression in 66 and I hope to uplift a fix for this.

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

--HG--
extra : moz-landing-system : lando
2019-02-26 16:38:30 +00:00
Alexandre Poirot
fc5fb970e7 Bug 1515290 - Instantiate DebuggerServer in dedicated loader when debugging chrome tabs. r=yulia,jdescottes
When debugging contexts running from the system compartment, the debugger has
to be loaded in a dedicated Loader, with invisibleToDebugger flag turned on.
This ensures that the Debugger API is going to be used from a distinct system
compartment. Otherwise it may be used from the same compartment than the page
we are debugging.

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

--HG--
extra : moz-landing-system : lando
2019-01-30 08:04:50 +00:00
Kris Maglione
e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

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

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Alexandre Poirot
9e9978c28d Bug 1521052 - Destroy DebuggerServer in the content process when the last connection drops. r=jdescottes
We never really tried to cleanup the DebuggerServer and so a few tests require some tweaks
to acknowledge that once the last connection drop (typically, we close the toolbox or target),
the server is destroyed and dynamically registered actors are also destroyed.

I think it is great to consider that everything is cleaned up as we may followup to destroy
the whole loader.

Depends on D16961

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

--HG--
extra : moz-landing-system : lando
2019-01-23 14:46:11 +00:00
Nathan Froyd
a9fb00a2f6 Bug 1485216 - remove Scheduler and related code from xpcom/threads; r=mccr8
Quantum DOM is no longer a priority, and the extra code it introduces to
several places block useful refactorings.
2019-01-22 20:16:56 -05: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
Alexandre Poirot
452829e172 Bug 1474980 - Stop exporting ActorPool/OriginalLocation from server/main.js. r=jryans
MozReview-Commit-ID: Gsef6U1g46r

--HG--
extra : rebase_source : 88211a36264a8f0191b0c8d2a22f3abf4df92183
2018-07-11 10:49:45 -07:00
Alexandre Poirot
09d08ff845 Bug 1474980 - Remove deprecated DebuggerServer.addActors(). r=jryans
MozReview-Commit-ID: 8J1wucp1G0p

--HG--
extra : rebase_source : 4a40b578808667ac45519172686e4237bb61423a
2018-07-11 10:41:27 -07:00
J. Ryan Stinnett
ca90a5ef7b Bug 1465637 - Rename tab-scoped actors to target-scoped actors. r=ochameau
The term "tab actor" was used ambiguously to mean either the "target actor
representing a tab" or "a child actor of the tab target actor" (such as the
console actor).  Here we rename the second case to "target-scoped actor".

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

--HG--
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-01.js
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-02.js
2018-06-26 13:27:57 +00:00
arthur.iakab
ff23802cfd Backed out changeset 88960670cf9f (bug 1465637) for failing talos damp tests on server/protocol.js: Error: Can't manage front without an actor ID on a CLOSED TREE
--HG--
rename : devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-01.js => devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js
rename : devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-02.js => devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js
2018-06-25 21:56:27 +03:00
J. Ryan Stinnett
8433b7ff9f Bug 1465637 - Rename tab-scoped actors to target-scoped actors. r=ochameau
The term "tab actor" was used ambiguously to mean either the "target actor
representing a tab" or "a child actor of the tab target actor" (such as the
console actor).  Here we rename the second case to "target-scoped actor".

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

--HG--
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-01.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-01.js
rename : devtools/client/debugger/test/mochitest/browser_dbg_tabactor-02.js => devtools/client/debugger/test/mochitest/browser_dbg_target-scoped-actor-02.js
2018-06-25 17:53:40 +00:00
J. Ryan Stinnett
e435d92b91 Bug 1172897 - Rename WebExtensionChildActor to WebExtensionTargetActor. r=ochameau
MozReview-Commit-ID: FkALAZ5HYCe

--HG--
rename : devtools/server/actors/addon/webextension.js => devtools/server/actors/targets/webextension.js
rename : devtools/shared/specs/targets/parent-process.js => devtools/shared/specs/targets/webextension.js
extra : rebase_source : a7249775cdecfb674fb7f7db84dc11f47c1ad7c5
2018-06-04 19:29:52 -05:00
J. Ryan Stinnett
3133003d18 Bug 1172897 - Move DevTools addon modules to subdir. r=ochameau
MozReview-Commit-ID: D61WJnoYQe3

--HG--
rename : devtools/server/actors/addons.js => devtools/server/actors/addon/addons.js
rename : devtools/server/actors/addon-console.js => devtools/server/actors/addon/console.js
rename : devtools/server/actors/webextension-inspected-window.js => devtools/server/actors/addon/webextension-inspected-window.js
rename : devtools/server/actors/webextension-parent.js => devtools/server/actors/addon/webextension-parent.js
rename : devtools/server/actors/webextension.js => devtools/server/actors/addon/webextension.js
rename : devtools/shared/fronts/addons.js => devtools/shared/fronts/addon/addons.js
rename : devtools/shared/fronts/webextension-inspected-window.js => devtools/shared/fronts/addon/webextension-inspected-window.js
rename : devtools/shared/specs/addons.js => devtools/shared/specs/addon/addons.js
rename : devtools/shared/specs/webextension-inspected-window.js => devtools/shared/specs/addon/webextension-inspected-window.js
rename : devtools/shared/specs/webextension-parent.js => devtools/shared/specs/addon/webextension-parent.js
extra : rebase_source : 7a9038e96f51695f92c3a676aeeaab02fd8ca10a
2018-06-04 18:12:11 -05:00
J. Ryan Stinnett
2d8cc5a3cb Bug 1172897 - Rename ChildProcessActor to ContentProcessTargetActor. r=ochameau
MozReview-Commit-ID: 60kELwh0N3f

--HG--
rename : devtools/server/actors/child-process.js => devtools/server/actors/targets/content-process.js
extra : rebase_source : 87af1aebbeeaf5a0649566a1f7cca37f88a7d5fe
2018-06-04 17:30:06 -05:00
J. Ryan Stinnett
fd4961af52 Bug 1172897 - Rename ContentActor to FrameTargetActor. r=ochameau
MozReview-Commit-ID: 3Rgvftpea8g

--HG--
rename : devtools/server/actors/content.js => devtools/server/actors/targets/frame.js
extra : rebase_source : 80f0aa2ad4a9ab183e08142aa043341a630faf1e
2018-05-30 14:09:45 -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
yulia
3891fa984c Bug 1450946 - Convert ContentActor to protocol.js; r=ochameau
MozReview-Commit-ID: D5IwzVlmfol

--HG--
extra : rebase_source : 043d9f652d6a11f00eeedc936da09e2aff6ffb6a
2018-05-07 11:06:35 +02:00
Peter Van der Beken
f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
J. Ryan Stinnett
c690e84914 Bug 1446222 - Move DevTools worker startup to new dir. r=jdescottes
Move and rename the server's worker debugger script that starts DevTools for a
worker from `worker.js` to `startup/worker.js`.

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: EvzDSGnG1vU

--HG--
rename : devtools/server/worker.js => devtools/server/startup/worker.js
extra : rebase_source : e0b4600a0644e3e8ebb14f3da9c7dcea94d776ad
2018-03-19 22:14:08 -05:00
J. Ryan Stinnett
0cee298854 Bug 1446222 - Move DevTools content process startup to new dir. r=jdescottes
Move and rename the server's process script (and accompanying JSM) that starts
DevTools for an entire content process from `content-process-debugger-server.js`
to `startup/content-process.js`.  `connectToContent` also becomes the more
specific `connectToContentProcess`.

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: 1evbZMB8T7r

--HG--
rename : devtools/server/content-process-debugger-server.js => devtools/server/startup/content-process.js
rename : devtools/server/content-server.jsm => devtools/server/startup/content-process.jsm
extra : rebase_source : e077dd3dc915ec274f866d53d3539909f8440de1
2018-03-19 21:28:26 -05:00
J. Ryan Stinnett
1c5534b4d8 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

--HG--
rename : devtools/server/child.js => devtools/server/startup/frame.js
rename : devtools/server/tests/mochitest/test_connectToChild.html => devtools/server/tests/mochitest/test_connectToFrame.html
extra : rebase_source : 2735c53587257b215d720204cf7c4581088eba42
2018-03-19 18:53:46 -05:00