Summary: | REGRESSION: r83938 abandons GC memory | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||||||
Component: | WebCore JavaScript | Assignee: | Geoffrey Garen <ggaren> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Major | CC: | alex, ap, beidson, mrowe, msaboff, simon.fraser | ||||||||
Priority: | P1 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | All | ||||||||||
OS: | OS X 10.5 | ||||||||||
Attachments: |
|
Description
Michael Saboff
2011-04-27 06:57:44 PDT
Created attachment 91648 [details]
Patch
Does this fix address anything from bug 40926 in any way? (In reply to comment #3) > Does this fix address anything from bug 40926 in any way? Yes, it seems to fix the test case attached there. Comment on attachment 91648 [details]
Patch
Loks good to me. As discussed in person, the wrapper need to be protected if the load is over, but an event is still pending. As you are going to work on a regression test for that, I can as well mark this patch r-.
Created attachment 91745 [details]
Patch
*** Bug 40926 has been marked as a duplicate of this bug. *** Comment on attachment 91745 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=91745&action=review > Source/WebCore/bindings/js/JSNodeCustom.cpp:108 > // If a wrapper is the last reference to an image or script element Please fix the comment, too. > Source/WebCore/loader/ImageLoader.cpp:70 > + bool hasPendingEvents(const ImageLoader* loader) { return m_dispatchSoonList.find(loader) != notFound; } We don't normally use const with complex classes. In particular, "const ImageLoader" never appears in WebCore code now. So, I would slightly prefer removing "const" from ImageLoader::hasPendingLoadEvent() instead. > LayoutTests/fast/dom/gc-image-element.html:17 > +function gc() You could also use js-test machinery for logging and gc(). Committed r85375: <http://trac.webkit.org/changeset/85375> Lack of constness on new methods in this patch makes me sad. |