Closed Bug 1441445 Opened 7 years ago Closed 6 years ago

Investigate aPrincipal assertion failures in nsIOService::SpeculativeConnectInternal

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

58 Branch
enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(1 file, 1 obsolete file)

This method is called multiple times with a null principal. For instance: https://dxr.mozilla.org/mozilla-central/source/netwerk/base/nsIOService.cpp#1916,1931 Having NS_ASSERTION(aPrincipal) is wrong.
Attached patch assertion.patch (obsolete) — Splinter Review
Attachment #8954274 - Flags: review?(ckerschb)
Comment on attachment 8954274 [details] [diff] [review] assertion.patch Review of attachment 8954274 [details] [diff] [review]: ----------------------------------------------------------------- I like being more aggressive here, but if we are calling it with a null principal quite so many times, how does that pass TRY?
Attachment #8954274 - Flags: review?(ckerschb) → review+
Probably we don't have any tests for this scenario. But, changing this NS_ASSERTION to MOZ_ASSERT, after a session restored, the parent process crashes.
Right, this patch is the wrong one. I forgot to exec hg qref.
Attachment #8954297 - Attachment is patch: true
Comment on attachment 8954297 [details] [diff] [review] bug_1441445_get_rid_of_nsioservice_speculativeconnectinternal_aprincipal_as Review of attachment 8954297 [details] [diff] [review]: ----------------------------------------------------------------- As discussed over IRC, we shouldn't remove the assertion, but rather make sure the callsites pass a valid triggeringPrincipal. You mentioned we don't have an automated testcase. Can you add some STRs so we can figure out the actual problem, fix it and add an automated test for it? Thanks!
Attachment #8954297 - Flags: review?(ckerschb) → review-
Summary: Get rid of nsIOService::SpeculativeConnectInternal aPrincipal assertion → Investigate aPrincipal assertion failures in nsIOService::SpeculativeConnectInternal
Priority: -- → P2
Depends on: 1461930
I filed bug 1461930. It seems that SessionStore.jsm is the component that passes a null principal calling SpeculativeConnect instead o SpeculativeConnect2.
Going to close this as the correct solution is fixing bug 1461930 which I am working on.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: