Closed Bug 1613873 Opened 6 years ago Closed 6 years ago

Create a simple http channel which is only used for TRR

Categories

(Core :: Networking, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

References

Details

(Whiteboard: [necko-triaged])

Attachments

(7 files)

Assignee: nobody → kershaw
Priority: -- → P1
Whiteboard: [necko-triaged]
Component: DOM: Networking → Networking

Some obstacles when making SimpleHttpChannel off main thread.

  1. SystemPrincipal can only used on main thread. We can't sue it here.
  2. LoadInfo expects that both loading and triggering principals not be null, so maybe we should create SimpleHttpChannel without LoadInfo.
  3. Need to modify nsHttpHandler::NewChannelId to make it thread safe.
  4. Some functions below are expected to be called on main thread.
    • nsHttpTransaction::Init
    • NS_GetOriginAttributes
    • nsHttpTransaction::Init
    • HttpBaseChannel::MaybeWaitForUploadStreamLength
    • AltSvcCache::GetAltServiceMapping
    • HttpBaseChannel::SetNotificationCallbacks
    • HttpBaseChannel::ReleaseListeners
    • nsHttpTransaction::OnPush
  5. nsDNSPrefetch is main thread only.
  6. nsProtocolProxyService is not thread safe.
  7. Need to modify TRR.cpp and TRRService.cpp to remove main thread assertion.
  8. Need to dispatch TRR runnable to another thread.
Blocks: 1615335

(In reply to Kershaw Chang [:kershaw] from comment #0)

See the design doc below.

https://docs.google.com/document/d/18yb_-rvC-Lj6uQVFGLrYvI3kNCEaDNq2gr-5VfI1TI0/edit?usp=sharing

Honza, could you take a quick look at this doc?
I'd like to make sure that I don't miss anything important.

Thanks!

Flags: needinfo?(honzab.moz)

(In reply to Kershaw Chang [:kershaw] from comment #8)

(In reply to Kershaw Chang [:kershaw] from comment #0)

See the design doc below.

https://docs.google.com/document/d/18yb_-rvC-Lj6uQVFGLrYvI3kNCEaDNq2gr-5VfI1TI0/edit?usp=sharing

Honza, could you take a quick look at this doc?
I'd like to make sure that I don't miss anything important.

Thanks!

Clear the ni. Feel free to file new bugs if you have any concerns or think something is missing.

Flags: needinfo?(honzab.moz)
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9f788f296658 P1: Implementation of SimpleHttpChannel r=dragana https://hg.mozilla.org/integration/autoland/rev/169136e81b36 P2: Use nsHttpTransaction off main thread r=dragana https://hg.mozilla.org/integration/autoland/rev/aa2177a92447 P3: Make nsDNSPrefetch support off main thread r=dragana https://hg.mozilla.org/integration/autoland/rev/6163d720bd10 P4: Use nsInputStreamPump off main thread completely r=dragana https://hg.mozilla.org/integration/autoland/rev/8de2717c220c P5: Support calling AltSvcCache::GetAltServiceMapping off main thread r=dragana https://hg.mozilla.org/integration/autoland/rev/edf1b907d5fd P6: Support calling nsHttpConnectionMgr::SpeculativeConnect off main thread r=dragana https://hg.mozilla.org/integration/autoland/rev/b41d942711a6 P7: Dispatch proxy resolution to main thread r=dragana
Regressions: 1635887
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: