Closed Bug 558490 Opened 15 years ago Closed 15 years ago

e10s HTTP: infrastructure to implement SetPriority

Categories

(Core :: Networking: HTTP, defect)

Other Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jduell.mcbugs, Assigned: jduell.mcbugs)

References

Details

Attachments

(1 file)

Attached patch infrastructure for SetPriority (deleted) — Splinter Review
The attached patch implements 95% of what we need for SetPriority in e10s. It implements SetPriority in HttpChannelChild, and sets it correctly in AsyncOpen. All that's missing is setting priority after AsyncOpen. This has the logic to send an IPDL msg to the Parent, but since we haven't yet figured out the "correct" way to keep a ref to the underlying nsHttpChannel in the parent, we don't do anything with the value. Will file a followup bug--I want this to land, because it appears to be the last piece needed to get testXul bootstrapped.
Attachment #438214 - Flags: review?(dwitte)
Comment on attachment 438214 [details] [diff] [review] infrastructure for SetPriority >diff --git a/netwerk/protocol/http/src/HttpChannelChild.cpp b/netwerk/protocol/http/src/HttpChannelChild.cpp >@@ -75,17 +75,16 @@ NS_INTERFACE_MAP_BEGIN(HttpChannelChild) >- NS_INTERFACE_MAP_ENTRY(nsISupportsPriority) I don't think you want that, otherwise HttpChannelChild won't be QI'able to nsISupportsPriority. >-NS_IMETHODIMP >-HttpChannelChild::AdjustPriority(PRInt32 delta) >-{ >- DROP_DEAD(); >+ PRInt16 newValue = CLAMP(aPriority, PR_INT16_MIN, PR_INT16_MAX); >+ if (mPriority == newValue) >+ return NS_OK; >+ mPriority = newValue; >+ if (mWasOpened) { >+ if (!SendSetPriority(mPriority)) { >+ // IPDL error: our destructor will be called automatically >+ // -- TODO: verify that that's the case No need to check the rv here, if the Send call fails the process aborts. >diff --git a/netwerk/protocol/http/src/HttpChannelParent.cpp b/netwerk/protocol/http/src/HttpChannelParent.cpp >+bool >+HttpChannelParent::RecvSetPriority(const PRUint16& priority) >+{ >+ // FIXME: bug XXX: once we figure out how to keep a ref to the nsHttpChannel, >+ // call SetPriority on it here. OT -- can't we make HttpChannelParent inherit from nsHttpChannel? >diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp >@@ -4000,17 +3999,16 @@ NS_INTERFACE_MAP_BEGIN(nsHttpChannel) >- NS_INTERFACE_MAP_ENTRY(nsISupportsPriority) Same comment here. r=dwitte with fixes
Attachment #438214 - Flags: review?(dwitte) → review+
Blocks: fennecko
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Assignee: nobody → jduell.mcbugs
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: