Bug 178139 - Layers should be destroyed by RenderLayerModelObject
Summary: Layers should be destroyed by RenderLayerModelObject
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-10-10 11:51 PDT by Antti Koivisto
Modified: 2017-10-10 13:37 PDT (History)
5 users (show)

See Also:


Attachments
patch (3.09 KB, patch)
2017-10-10 11:52 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2017-10-10 11:51:41 PDT
...instead of RenderObject.
Comment 1 Antti Koivisto 2017-10-10 11:52:55 PDT
Created attachment 323328 [details]
patch
Comment 2 Simon Fraser (smfr) 2017-10-10 12:53:09 PDT
Comment on attachment 323328 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=323328&action=review

> Source/WebCore/rendering/RenderObject.cpp:-1444
> -    // FIXME: Would like to do this in RenderBoxModelObject, but the timing is so complicated that this can't easily
> -    // be moved into RenderLayerModelObject::willBeDestroyed().
> -    // FIXME: Is this still true?
> -    if (hasLayer()) {
> -        setHasLayer(false);
> -        downcast<RenderLayerModelObject>(*this).destroyLayer();
> -    }
> -

Should RenderObject have ASSERT(!hasLayer()) somewhere late in its destruction to ensure that we didn't re-assign a layer after RenderLayerModelObject::destroyLayer() ran?
Comment 3 Antti Koivisto 2017-10-10 13:09:41 PDT
There isn't really much between willBeDestroyed() and the destructor.
Comment 4 WebKit Commit Bot 2017-10-10 13:36:51 PDT
Comment on attachment 323328 [details]
patch

Clearing flags on attachment: 323328

Committed r223139: <http://trac.webkit.org/changeset/223139>
Comment 5 WebKit Commit Bot 2017-10-10 13:36:53 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-10-10 13:37:54 PDT
<rdar://problem/34918241>