Commit Graph
63 Commits
Author SHA1 Message Date
Alexandre Poirot 3d76320218 Bug 1387123 - Replace all usages of require(promise).defer by require(devtools/shared/defer).defer. r=tromey
In prevision of Promise.jsm removal, use defer helper module instead of Promise.jsm
as that's the only one feature that DOM Promise don't support.

PART2: Substitutes promise.defer usages with defer
$ sed -i 's/promise.defer/defer/gI' $(egrep -lir "promise.defer\(\)" devtools)
  Reset modification to the following files as they are using deprecated syncable promises as we don't want to touch them.
  http://searchfox.org/mozilla-central/search?q=deprecated-sync-thenables&case=true&regexp=false&path=
$ git checkout devtools/client/debugger/test/mochitest/
$ git checkout devtools/shared/client/main.js
$ git checkout devtools/client/debugger/
$ git checkout devtools/server/main.js

MozReview-Commit-ID: DGN5ae68wtn
2017-08-08 15:24:04 +02:00
Alexandre Poirot 1f1a801a56 Bug 1387123 - Replace all usages of require(promise).defer by require(devtools/shared/defer).defer. r=tromey
In prevision of Promise.jsm removal, use defer helper module instead of Promise.jsm
as that's the only one feature that DOM Promise don't support.

PART1: Import devtools/shared/defer
$ sed -i '/require("promise")/a const defer = require("devtools/shared/defer");' $(egrep -lir "promise.defer\(\)" $(egrep -rl "require\(\"promise\"\)" devtools))
But ignore debugger as it still uses sync promises and would better be handled manually
$ git checkout devtools/client/debugger/
MozReview-Commit-ID: 7FvhNxULB2x
2017-08-08 15:33: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
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
Kevin Jones 8593e2602b Bug 1345090 - Modify SessionStore to restore tabs with lazy browsers. r=mikedeboer,dao
MozReview-Commit-ID: 5J5UqlWMxKX
2017-04-20 11:01:09 +02:00
Florian Queze ddf0cda8da Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Sebastian Hengst 4cd95d4a02 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Florian Queze 35cd8ba883 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
J. Ryan Stinnett 7dc78d9187 Bug 1353559 - Filter out exited browsers from tab list. r=ochameau
This adds higher level protection to ignore exited browser actors, so we don't
end up triggering methods like `form` on them, since they won't make much sense
anyway.

MozReview-Commit-ID: KgUCA04N2fY
2017-04-05 07:27:30 -05:00
J. Ryan Stinnett 50a214cd50 Bug 1353559 - Guard against null browser in exited actor. r=ochameau
MozReview-Commit-ID: 4TZZMywFIdu
2017-04-04 17:41:30 -05:00
Julian Descottes bb0a032401 Bug 1304941 - reject update promise in BrowserTabActor destroy;r=jryans
MozReview-Commit-ID: LNclCPv1Zo
2017-02-10 23:43:37 +01:00
Florian Quèze c8cf49999e Bug 1334156 - script-generated patch to replace .ownerDocument.defaultView with .ownerGlobal, r=jaws. 2017-01-27 10:51:03 +01:00
Florian Quèze 63de711857 Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
Alexandre Poirot d620db5474 Bug 1323466 - Split actors/worker.js in two to prevent loading unecessary actor code in parent process. r=jryans
The main goal here is to prevent loading protocol.js in the parent process.

MozReview-Commit-ID: 1HzbqNZ81v1
2016-12-14 08:35:47 -08:00
Alexandre Poirot 03c57937ae Bug 1321096 - Extract TabActor into its own module to prevent loading it in the parent process. r=jryans
MozReview-Commit-ID: 6QyXMaPeEDH
2016-12-01 13:20:31 -08:00
J. Ryan Stinnett ca28966f00 Bug 1315391 - Rename all disconnect methods to destroy in actors. r=ochameau
Ever since protocol.js was added as a way to create DevTools actors, we've had
lots of confusion about the correct way to implement actor destruction.  If your
actor's _parent_ was the legacy kind, you had to use `disconnect`.  If it was
protocol.js, you had to use `destroy`.

There is no reason for this madness, which makes reasoning about destruction
quite hard.  Here we rename `disconnect` to `destroy` so there is only one name
for every destruction path.

MozReview-Commit-ID: C1Yw9NfUUR2
2016-11-11 18:24:58 -06:00
Alexandre Poirot 51cd0e7550 Bug 983386 - Delay "navigate" event when we are redirected to a error page, to only fire once the error page is loaded. r=jryans
MozReview-Commit-ID: 4XIgKzUHVLW
2016-10-19 05:45:30 -07:00
Alexandre Poirot 1835b403d7 Bug 1299602 - Do not suspend navigation when navigating with a breakpoint. r=jlongster
MozReview-Commit-ID: L6WGZcL5eWL
2016-09-01 02:42:03 -07:00
Tim Nguyen 98306db559 Bug 1254386 - Move custom UA emulation to emulation actor. r=jryans
MozReview-Commit-ID: 9005ktskEVk
2016-08-23 01:51:16 -07:00
J. Ryan Stinnett 455c5bb644 Bug 1240912 - Filter requests by top frame's outerWindowID. r=ochameau
MozReview-Commit-ID: B5Y65EVG8Tz
2016-08-19 10:01:27 -05:00
Luca Greco 5eeda63bca Bug 1285557 - Fix eslint errors on webbrowser devtools actor. r=jryans
MozReview-Commit-ID: 5TdmJHqqsn2
2016-07-25 12:18:33 +02:00
Luca Greco 537d059f73 Bug 1285557 - Create a WebExtensionAddonActor based on ChromeActor and TabActor. r=jryans
MozReview-Commit-ID: 70sLUzqHHsl
2016-07-25 16:28:49 +02:00
Luca Greco 1fc23a332e Bug 1268773 - Update the Addon Wrapper for cached addon actors on reload. r=ochameau
MozReview-Commit-ID: AWNPTyIuzCX
2016-07-06 16:18:58 +02:00
J. Ryan Stinnett 30933227ec Bug 1240907 - Flatten RemoteBrowserTabActor into BrowserTabActor. r=ochameau
The removes the legacy path for non-e10s that avoids the messageManager.  We now
use the messageManager for all cases, both e10s off and on.

Unsurprisingly, this revealed a variety of race conditions in various tests, so
they've been cleaned up as well.

MozReview-Commit-ID: EXEWehphLIY
2016-07-21 12:20:55 -05:00
J. Ryan Stinnett 3b0119033c Bug 1240907 - Tunnel toolbox messages to content in RDM. r=ochameau
When you open a toolbox in RDM, it will now debug the content page, instead of
the RDM UI.

MozReview-Commit-ID: LXbVhwNVlcp
2016-07-21 12:20:55 -05:00
Jaideep Bhoosreddy 8878aa9116 Bug 670002 - Use source maps in the web console w/ performance issues; r=jsantell 2016-07-20 19:09:00 +02:00
Wes Kocher c81f8b6029 Backed out changeset aab8baf2c5f5 (bug 670002) for eslint failures 2016-07-20 12:56:46 -07:00
Jaideep Bhoosreddy a410059042 Bug 670002 - Use source maps in the web console w/ performance issues. r=jsantell 2016-07-20 00:40:00 -04:00
Alexandre Poirot a92cc49b04 Bug 1281726 - Emit TabActor.tabDetached whenever the actor is detached. r=jryans 2016-07-13 23:34:17 -07:00
Alexandre Poirot 43293a7a75 Bug 1281726 - Support TabActor.getTab against mozbrowser iframes. r=jryans 2016-07-13 23:34:17 -07:00
Nicolas Chevobbe b77179e404 Bug 1240038 - Listen for changes when a StyleSheetActor is created. r=tromey
A listener was added for stylesheet changes only if the stylesheet already
contributed to the page before the modification. So if there was a stylesheet
without any rule matching a node of the page, when a rule was created in it for
the current selected node in the markup view, the rule view wasn't refreshed.
The fix here is to emit an event, from the TabActor, when a StyleSheetActor is created,
and listen to such event to watch for changes in it, in order to update the rule view.
Modify an existing rule view/stylesheet editor sync test to make sure this bug is fixed.


MozReview-Commit-ID: H3szbUnchQP
2016-06-07 22:28:45 +02:00
J. Ryan Stinnett 169c44d5f6 Bug 1193390 - Remove single arg Cu.import from /devtools. r=tromey
A few miscellaneous linting issues also addressed near the lines involved.

MozReview-Commit-ID: 9t1RwxdSS2X
2016-06-09 14:10:07 -05:00
Andrea Marchesini 53ff1fb52e Bug 1278630 - Native Console API should work also after a refresh, r=bgrins 2016-06-08 08:01:08 -07:00
Kumar McMillan ccb419f4dd Bug 1277054 - Handle exited add-on actors after reload. r=ochameau
MozReview-Commit-ID: 6WFI51GJ3ea
2016-05-31 15:40:19 -05:00
J. Ryan Stinnett 530b903fcf Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.

To generate this patch, I ran:

./mach eslint devtools --no-ignore --fix

After this, I reverted any changes to third party files that we really do want
to ignore.

MozReview-Commit-ID: 6Q8BApkAW20
2016-05-18 12:49:23 -05:00
Kumar McMillan 3684fadf77 Bug 1267870 - Refresh about:debugging when add-on manifest is reloaded. r=ochameau
MozReview-Commit-ID: Bf1V3XoX6Co
2016-05-12 11:39:58 -05:00
Alexandre Poirot 9206de9f6a Bug 1266128 - Send tabListChanged messages when tab title changes. r=jryans 2016-05-03 09:06:31 -07:00
Jarda Snajdr 5c166fc259 Bug 1259743 - Part 3: Remove the mustNotifyServiceWorkerRegistrationChanged check as it's dead code. r=janx 2016-04-28 03:55:00 -04:00
Jarda Snajdr bf32d2f44a Bug 1259743 - Part 2: Make devtools/server/actors/webbrowser.js eslint-clean. r=ochameau 2016-04-28 03:54:00 -04:00
Jarda Snajdr c240d3bf78 Bug 1259743 - Part 1: Inline sources in iframe stop being displayed after few reloads. r=ochameau 2016-04-28 03:53:00 -04:00
Luca Greco 0946ba5a9b Bug 1261857 - [webext] Add existent WebExtensions ContentScript globals in the Tab DevTools debuggees. r=ochameau
MozReview-Commit-ID: K5YESAVRikO
2016-04-20 16:36:29 +02:00
Nick Fitzgerald 324b1c1b6d Bug 1237054 - Part 3: Get the devtools/client/debugger/test/mochitest/* tests passing without DevToolsUtils.assert failures; r=jryans 2016-04-06 06:34:00 +02:00
Alexandre Poirot 451c825363 Bug 1233463 - Support outerWindowID in getTab request for tabs in child processes. r=jryans 2016-03-16 06:42:19 -07:00
Jordan Santell 91eae2ce6e Bug 1177279 - Create a SourceLocationController to manage the state of updating sources for source mapping. r=jlong,jryans 2016-03-14 18:49:07 -07:00
Jan Keromnes 5d79f43454 Bug 1212797 - Refactor worker actors to protocol.js. r=ochameau 2016-02-24 06:29:00 +01:00
Lin Clark 5aff0c2eb9 Bug 1241707 - [e10s] Web Console should restore focus to proper place when closed. r=jryans,r=bgrins
MozReview-Commit-ID: JlcJPGygm5F
2016-02-16 14:37:45 -08:00
Carsten "Tomcat" Book ddff5d29bb Backed out changeset cdbe72c64a60 (bug 1241707) 2016-02-12 12:16:01 +01:00
Lin Clark 740ac497f8 Bug 1241707 - [e10s] Web Console should restore focus to proper place when closed. r=jryans 2016-02-11 16:00:00 +01:00
Tim Nguyen c9f74413cb Bug 828008 - Expand TabActor to support UA emulation. r=jryans 2015-12-23 15:04:00 +01:00