Closed
Bug 1137384
Opened 9 years ago
Closed 9 years ago
Move ThreadSources into its own devtools-wide file
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox39 fixed)
RESOLVED
FIXED
Firefox 39
Tracking | Status | |
---|---|---|
firefox39 | --- | fixed |
People
(Reporter: jlong, Assigned: jlong)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 5 obsolete files)
67.62 KB,
patch
|
Details | Diff | Splinter Review |
The idea of `ThreadSources` was to have a single places that sources are managed, and anything like sourcemapping can be done there, and eventually we could make this available to other tools. That time is now, since we need sourcemaps in the console. I don't think it should be too hard to move `ThreadSources` into something per-tab. I'm not exactly where this should be yet, but I wanted to go ahead and file this bug because Eddy is working on the backend so I'll need to coordinate with him carefully so I don't conflict with this work.
Assignee | ||
Comment 1•9 years ago
|
||
Eddy, this is not extremely urgent, so I'm happy to wait for a window that will work well for you. I don't know how much you are touching ThreadSources right now.
Assignee | ||
Comment 2•9 years ago
|
||
This actually wasn't that hard. This patch just moves ThreadSources up into the tab actors (and renamed TabSources) and makes everything work with that move. This doesn't add any new functionality, it just refactors the code and makes sure everything still works. I need to wait for bug 1059308 to land before I finish the patch because that changes how the browser debugger works. The browser debugger will inherit from TabActor and get this for free, instead of now I'd have to manually patch the chrome debugger (and it's actually not clear to do it). That bug should land this week. No need to review until I get that change in
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → jlong
Assignee | ||
Comment 3•9 years ago
|
||
All tests pass! Ready for review. I rebased this yesterday so it should be up-to-date. Hopefully it doesn't conflict much with any work you have in your repo.
Attachment #8572208 -
Attachment is obsolete: true
Attachment #8575603 -
Flags: review?(ejpbruel)
Assignee | ||
Comment 4•9 years ago
|
||
Nick was interested in this too, this is a big enough change that more reviewers would be good.
Flags: needinfo?(nfitzgerald)
Assignee | ||
Comment 5•9 years ago
|
||
Oops, forgot to add some comments in TabSources
Attachment #8575603 -
Attachment is obsolete: true
Attachment #8575603 -
Flags: review?(ejpbruel)
Attachment #8575606 -
Flags: review?(ejpbruel)
Comment 6•9 years ago
|
||
Comment on attachment 8575603 [details] [diff] [review] 1137384.patch Review of attachment 8575603 [details] [diff] [review]: ----------------------------------------------------------------- Overall, very nice. We've needed this for a while. ::: toolkit/devtools/server/actors/script.js @@ +2026,5 @@ > let endLine = aScript.startLine + aScript.lineCount - 1; > + for (let _actor of this.breakpointActorMap.findActors()) { > + // We do async work in here, so we need to create a fresh > + // binding because for/of does not yet do that in SpiderMonkey > + // (remove this when bug 1101653 is fixed) Nit: file a follow up that depends on bug 1101653 (and gets an auto update when that bug is fixed) and link it here so that we don't forget. // XXX Bug #######: We do async work in here ... ::: toolkit/devtools/server/actors/utils/TabSources.js @@ +153,5 @@ > + if (id) { > + actor.actorID = id; > + } > + > + this._thread.threadLifetimePool.addActor(actor); The `SourceActor`s should be children of the `TabActor` in the actor hierarchy, that way non-ThreadActor actors can safely use them and not worry about lifetimes.
Attachment #8575603 -
Attachment is obsolete: false
Comment 7•9 years ago
|
||
Comment on attachment 8575603 [details] [diff] [review] 1137384.patch Stupid splinter
Attachment #8575603 -
Attachment is obsolete: true
Flags: needinfo?(nfitzgerald)
Comment 8•9 years ago
|
||
Comment on attachment 8575606 [details] [diff] [review] 1137384.patch Review of attachment 8575606 [details] [diff] [review]: ----------------------------------------------------------------- I only looked whether this patch would interfere with my work on breakpoint sliding. If I read the patch correctly, the API of ThreadSources didn't change, and is still available via threadActor.sources. I only need access to source map functions like getGeneratedLocation etc. If correct, this should be fairly easy for me to rebase on top of, so feel free to land.
Attachment #8575606 -
Flags: review?(ejpbruel) → review+
Assignee | ||
Comment 9•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=eae4a82bb523
Assignee | ||
Comment 10•9 years ago
|
||
Turns out ThreadSources had a bunch of dependencies on the synchronous `resolve` promise method, and making it async is showing a few race conditions. Bah.
Assignee | ||
Comment 11•9 years ago
|
||
Still trying to track down the intermittent. I used to be able to reproduce it locally, but can't anymore, so I wonder if recent refactorings fixed it. Two try pushes: TabSources using sync promises: https://treeherder.mozilla.org/#/jobs?repo=try&revision=87ae08be00ab TabSources using async promises: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d6604c2b9703 I'm not going to use sync promises in the end, but its just a test case to see if the former succeeds and the latter fails.
Assignee | ||
Comment 12•9 years ago
|
||
Above try looks green, but was only on linux. Here's a full try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=8f382813f929
Assignee | ||
Comment 14•9 years ago
|
||
Hm, looks like there might be some leaks... let's see if this fixes it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=69694a28eba4
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Assignee | ||
Comment 16•9 years ago
|
||
Windows debug failure doesn't look like mine, and OSX seems to have trouble building, I just retriggered it though to see if works.
https://hg.mozilla.org/mozilla-central/rev/977b4598da47
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 39
Depends on: 1149910
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•