[webkit-dev] DocumentLoader::m_mainResourceData seems no need
pfeldman at chromium.org
Tue Aug 16 00:41:27 PDT 2011
On Tue, Aug 16, 2011 at 11:20 AM, Xianzhu Wang <phnixwxz at gmail.com> wrote:
> I found that DocumentLoader will hold m_mainResourceData during its whole
> life. I'm wondering if this is necessary. I searched all callers of
> DocumentLoader::mainResourceData() and DocumentLoader::mainResource() and
> they seem all called before or just after the document is loaded.
This is not the case for the inspector and a number of other usages I can
"just after" might be problematic to define as well.
If we remove DocumentLoader::m_mainResourceData, the main resource data
> could be freed if there is no other references (seems true if the page is
> not inspected) and will save memory.
> I tried to removing DocumentLoader::m_mainResourceData and run all layout
> tests in chromium-linux. I got 6 text mismatches and 1 timeout and will
> investigate the failures.
> However, can anyone describe the original intent of
> DocumentLoader::m_mainResourceData? What's the case that it is used after
> the document is loaded?
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the webkit-dev