Closed Bug 1230556 Opened 9 years ago Closed 9 years ago

Don't block debugger shutdown on pending async requests

Categories

(DevTools :: Debugger, defect)

40 Branch
defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Firefox 45
Tracking Status
firefox45 --- fixed

People

(Reporter: jlong, Assigned: jlong)

References

Details

Attachments

(1 file, 1 obsolete file)

In my debugger refactor I changed the `shutdown` method to wait on any pending async requests. I did this for correctness: previously if you called `loadSources` and the results came back after the debugger was shutdown it would try to update the UI which doesn't exist anymore. And just error.

Later on I discovered I needed a similar feature when reloading the page, because it has the exact same problem: we don't want to handle async requests leftover from a previous session. But we can't block tab navigation, so it forced me to find another solution.

That solution is basically just to ignore the results from any async request that we aren't interested in. See https://bugzilla.mozilla.org/show_bug.cgi?id=1230215#c5 for more explanation. It's a much better solution and I should switch the debugger shutdown to do the same thing instead of block on them.

This is probably the biggest reason for the talos regression in bug 1230215 because the shutdown will now take longer.
Assignee: nobody → jlong
Status: NEW → ASSIGNED
Blocks: 1230215
Attached patch 1230556.patch (obsolete) (deleted) — Splinter Review
Yay for patches that just remove code!

This method was a little awkward anyway, though I think it is a neat way to block on pending async requests. We don't need to keep a list of promises anywhere or anything like that. But still, I'm glad we can just remove it.

Let me know if you have any questions about it.
Attachment #8695887 - Flags: review?(nfitzgerald)
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6db8e94ea957

I think I may just r=me on this if things pass, it's a simple change that should fix the talos regression.
Unfortunately looks like that has a faulty parent commit. Rebased and hopefully that fixes it: https://treeherder.mozilla.org/#/jobs?repo=try&revision=afa60a76cf62
Attached patch 1230556.patch (deleted) — Splinter Review
Tweaked patch message. I went ahead and self-reviewed this because I want to make sure to fix any debugger problems before the uplift which is coming up soon.
Attachment #8695887 - Attachment is obsolete: true
Attachment #8695887 - Flags: review?(nfitzgerald)
(and it's a very tiny change)
https://hg.mozilla.org/mozilla-central/rev/2193658ea0c7
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: