Closed Bug 1800606 Opened 2 years ago Closed 2 years ago

Stop using nsSyncStreamListener

Categories

(Thunderbird :: Upstream Synchronization, defect)

defect

Tracking

(thunderbird_esr102 unaffected)

RESOLVED FIXED
109 Branch
Tracking Status
thunderbird_esr102 --- unaffected

People

(Reporter: darktrojan, Assigned: darktrojan)

References

Details

Attachments

(2 files)

Bug 1800344 has killed off the nsSyncStreamListener::Create constructor which we use to create nsSyncStreamListeners in JS. We only do this in two places in the calendar, and I'm sure this isn't the first time I've had a fight with them because of the stream listener. Let's just do it a different way.

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/364bcd649780
Stop using nsSyncStreamListener. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Sadly there's also a bunch of usage in tests (test_detachToFile, test_mimemaltdetach, test_imapAttachmentSaves, test_quarantineFilterMove and ComposeHelpers.jsm)

(In reply to Geoff Lankow (:darktrojan) from comment #0)

Bug 1800344 has killed off the nsSyncStreamListener::Create constructor which we use to create nsSyncStreamListeners in JS.

Sorry for the trouble! I'm glad this seems to have been straightforward to address, though.

For context: I was looking at nsSyncStreamListener::Create (and just removed it as a simplification opportunity) after filing bug 1800152, which seems to be a Thunderbird stack-exhaustion crash, with infinite event-loop-spinning recursion inside that function. (nsSyncStreamListener::Create causing an event loop spin during which we call nsSyncStreamListener::Create again, etc.)

I wonder if the cleanups here might impact that infinite recursion bug at all, or if any of the folks here have any ideas about what might be going on in that bug?

See Also: → 1800152
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/f62a51244eca Stop using nsSyncStreamListener in tests. r=darktrojan

(In reply to Daniel Holbert [:dholbert] from comment #5)

For context: I was looking at nsSyncStreamListener::Create (and just removed it as a simplification opportunity) after filing bug 1800152, which seems to be a Thunderbird stack-exhaustion crash, with infinite event-loop-spinning recursion inside that function. (nsSyncStreamListener::Create causing an event loop spin during which we call nsSyncStreamListener::Create again, etc.)

I wonder if the cleanups here might impact that infinite recursion bug at all, or if any of the folks here have any ideas about what might be going on in that bug?

I don't think I have any useful insight here, and I'm not sure why anything would be using Open instead of AsyncOpen (as mentioned in the other bug) unless it's the sync stream listener we've just stopped using. For curiosity's sake, I'll change that function to return NS_ERROR_NOT_IMPLEMENTED and do a Try run to see if anything breaks.

Regressions: 1800789

I don't think I have any useful insight here, and I'm not sure why anything would be using Open instead of AsyncOpen (as mentioned in the other bug) unless it's the sync stream listener we've just stopped using. For curiosity's sake, I'll change that function to return NS_ERROR_NOT_IMPLEMENTED and do a Try run to see if anything breaks.

Doing this found one place in product code that calls open instead of asyncOpen on a mail channel, and at least one in tests. (If I'd looked up channel.open in searchfox that also would've found them, but I'm not that smart.) These can (should) be changed.

Regressions: 1808557
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: