Closed
Bug 601557
Opened 15 years ago
Closed 15 years ago
imgRequestProxy requests in async_load_tests.js are too susceptible to garbage collection
Categories
(Core :: Graphics: ImageLib, defect)
Tracking
()
RESOLVED
FIXED
mozilla2.0b7
People
(Reporter: jdm, Assigned: jdm)
References
Details
Attachments
(2 files)
|
1.80 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.62 KB,
patch
|
joe
:
review+
|
Details | Diff | Splinter Review |
Applying the httpd.js GC patch from bug 508128 has exposed a problem in the tests in async_load_tests.js. Since imgRequests only hold weak references to the proxies, the only strong ref comes from the |var req = loader.loadImageWithChannel(...)| lines. With the 508128 patch, there's a race which httpd.js can win which initiates a GC before the various necko events occur. Since the req variable is out of scope at this point, the proxy is destroyed and triggers the |NS_PRECONDITION(!mListener, "Someone forgot to properly cancel this request!");| assertion. The attached testcase easily demonstrates this with 508128 applied - for me it consistently asserts in check-interactive and passes in check-one.
| Assignee | ||
Comment 1•15 years ago
|
||
| Assignee | ||
Comment 2•15 years ago
|
||
The easiest fix is just to push each request onto a global array which retains them until the end of time. I don't know if it's worth trying to find a more elegant solution.
| Assignee | ||
Comment 3•15 years ago
|
||
Like so.
Updated•15 years ago
|
Attachment #480578 -
Flags: review?(joe)
Updated•15 years ago
|
Attachment #480578 -
Flags: review?(joe) → review+
Comment 4•15 years ago
|
||
Assignee: nobody → josh
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Updated•15 years ago
|
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in
before you can comment on or make changes to this bug.
Description
•