Clear active tree scopes on StyleEngine::didDetach().
clearResolver() is not only called on didDetach(). Make it private and
name it clearResolvers to reflect that it clears scoped resolvers as
well. The comments related to style resolver reconstructruction is
removed as that does not happen anymore.
Clearing m_treeBoundaryCrossingScopes is moved into didDetach()
which was a more natural place.
Clear active and dirty tree scopes in didDetach to not unnecessarily
hang on to any memory associated with them.
These changes were done investigating issue 675533, but won't
necessarily fix anything for that issue.
BUG=567021, 675533
Committed: https://crrev.com/b0f03812c4f8ca50a0cc07caaca0c8eafbb2862a
Cr-Commit-Position: refs/heads/master@{#439973}

On 2016/12/20 19:04:10, sof wrote:
> If these objects will already become garbage at the same time (==same GC) as
the
> StyleEngine, then there won't be gains wrt allocation reuse here. If that's
the
> main motivation.
I think they can be garbage collected before for the same reason I gave in
https://codereview.chromium.org/2589243002#msg11

Description was changed from
==========
Clear active tree scopes on StyleEngine::didDetach().
clearResolver() is not only called on didDetach(). Make it private and
name it clearResolvers to reflect that it clears scoped resolvers as
well. The comments related to style resolver reconstructruction is
removed as that does not happen anymore.
Clearing m_treeBoundaryCrossingScopes is moved into didDetach()
which was a more natural place.
Clear active and dirty tree scopes in didDetach to not unnecessarily
hang on to any memory associated with them.
These changes were done investigating issue 675533, but won't
necessarily fix anything for that issue.
BUG=567021,675533
==========
to
==========
Clear active tree scopes on StyleEngine::didDetach().
clearResolver() is not only called on didDetach(). Make it private and
name it clearResolvers to reflect that it clears scoped resolvers as
well. The comments related to style resolver reconstructruction is
removed as that does not happen anymore.
Clearing m_treeBoundaryCrossingScopes is moved into didDetach()
which was a more natural place.
Clear active and dirty tree scopes in didDetach to not unnecessarily
hang on to any memory associated with them.
These changes were done investigating issue 675533, but won't
necessarily fix anything for that issue.
BUG=567021,675533
Review-Url: https://codereview.chromium.org/2593643002
==========

Description was changed from
==========
Clear active tree scopes on StyleEngine::didDetach().
clearResolver() is not only called on didDetach(). Make it private and
name it clearResolvers to reflect that it clears scoped resolvers as
well. The comments related to style resolver reconstructruction is
removed as that does not happen anymore.
Clearing m_treeBoundaryCrossingScopes is moved into didDetach()
which was a more natural place.
Clear active and dirty tree scopes in didDetach to not unnecessarily
hang on to any memory associated with them.
These changes were done investigating issue 675533, but won't
necessarily fix anything for that issue.
BUG=567021,675533
Review-Url: https://codereview.chromium.org/2593643002
==========
to
==========
Clear active tree scopes on StyleEngine::didDetach().
clearResolver() is not only called on didDetach(). Make it private and
name it clearResolvers to reflect that it clears scoped resolvers as
well. The comments related to style resolver reconstructruction is
removed as that does not happen anymore.
Clearing m_treeBoundaryCrossingScopes is moved into didDetach()
which was a more natural place.
Clear active and dirty tree scopes in didDetach to not unnecessarily
hang on to any memory associated with them.
These changes were done investigating issue 675533, but won't
necessarily fix anything for that issue.
BUG=567021,675533
Committed: https://crrev.com/b0f03812c4f8ca50a0cc07caaca0c8eafbb2862a
Cr-Commit-Position: refs/heads/master@{#439973}
==========

On 2016/12/20 21:04:31, rune wrote:
> On 2016/12/20 19:04:10, sof wrote:
> > If these objects will already become garbage at the same time (==same GC) as
> the
> > StyleEngine, then there won't be gains wrt allocation reuse here. If that's
> the
> > main motivation.
>
> I think they can be garbage collected before for the same reason I gave in
> https://codereview.chromium.org/2589243002#msg11
makes sense, StyleEngine would then live on in a detached state.