Closed
Bug 1196476
Opened 10 years ago
Closed 10 years ago
Replace ProgressTracker::FirstObserverIs() with a simpler mechanism
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: seth, Assigned: seth)
References
Details
Attachments
(1 file)
5.30 KB,
patch
|
tnikkel
:
review+
|
Details | Diff | Splinter Review |
In bug 1194912 we'll start storing ProgressTracker's observer list as a hash table, which means there won't be a clearly defined notion of which observer is first, because hash tables aren't ordered.
Unfortunately, we rely upon this information, because we use ProgressTracker::FirstObserverIs() to ensure that only the first imgRequestProxy for a given image can adjust the image's network priority.
In this bug, we'll get rid of FirstObserverIs() and replace it with a simpler mechanism that will live directly in imgRequest.
Assignee | ||
Comment 1•10 years ago
|
||
Here's the patch. We basically just store a raw pointer to the first observer on
imgRequest. We only store this pointer for the purposes of comparison with other
pointers, so it's OK that it's raw.
It could happen that the first observer could get destroyed and another
imgRequestProxy for the same image could get allocated at the same location, so
this mechanism might fail sometimes, but this doesn't seem any more dangerous
than the current method, since if we destroy the first proxy for the image now,
another proxy will effectively randomly become the "first" proxy.
Attachment #8650154 -
Flags: review?(tnikkel)
Assignee | ||
Comment 2•10 years ago
|
||
Updated•10 years ago
|
Attachment #8650154 -
Flags: review?(tnikkel) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Comment 4•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
You need to log in
before you can comment on or make changes to this bug.
Description
•