Bug 178139

Summary: Layers should be destroyed by RenderLayerModelObject
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch none

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>