Closed Bug 1348016 Opened 7 years ago Closed 7 years ago

nsHttpConnectionMgr::OnMsgCancelTransactions miss to cancel one transaction

Categories

(Core :: Networking: HTTP, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: dragana, Assigned: dragana)

References

Details

(Whiteboard: [necko-active])

Attachments

(1 file, 1 obsolete file)

This is a regression from bug 1312774. I notice it while I was rebasing 1341572.
Assignee: nobody → dd.mozilla
Blocks: 1312774
Status: NEW → ASSIGNED
Whiteboard: [necko-active]
Attachment #8848160 - Flags: review?(honzab.moz)
Comment on attachment 8848160 [details] [diff] [review]
bug_missing_one_trans_during_canceling.patch

Review of attachment 8848160 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -2130,5 @@
>          return;
>      }
>  
> -    for (int32_t i = ent->mUrgentStartQ.Length() - 1; i > 0;) {
> -        --i;

Thanks Dragana, but the correct fix is:


for (int32_t i = ent->mUrgentStartQ.Length(); i > 0;) {
  --i;
  ...
}

This change was reviewed, fix suggested, but apparently not implemented (sorry to miss this - important - detail during r).
Attachment #8848160 - Flags: review?(honzab.moz) → review-
The other version would work too, our pending queue is never that full
Attachment #8848160 - Attachment is obsolete: true
Attachment #8848177 - Flags: review?(honzab.moz)
Comment on attachment 8848177 [details] [diff] [review]
bug_missing_one_trans_during_canceling.patch

Review of attachment 8848177 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks.
Attachment #8848177 - Flags: review?(honzab.moz) → review+
(In reply to Dragana Damjanovic [:dragana] from comment #3)
> The other version would work too, our pending queue is never that full

If we ever migrate to uint32_t or size_t or nsTArray::index_type here, we would overflow (0 - 1 = 0xffffffff), badly when not caught.  It's just a precaution for future ;)
(In reply to Honza Bambas (:mayhemer) from comment #5)
> (In reply to Dragana Damjanovic [:dragana] from comment #3)
> > The other version would work too, our pending queue is never that full
> 
> If we ever migrate to uint32_t or size_t or nsTArray::index_type here, we
> would overflow (0 - 1 = 0xffffffff), badly when not caught.  It's just a
> precaution for future ;)

this one is fixed and 20 others are going to overflow... in case we switch we will need to audit this file anyway.
Pushed by dd.mozilla@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4a8029b94ff
nsHttpConnectionMgr::OnMsgCancelTransactions miss to cancel one transaction. r=mayhemer
https://hg.mozilla.org/mozilla-central/rev/d4a8029b94ff
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: