Bug 179014 - Remove empty continuations in RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers
Summary: Remove empty continuations in RenderObject::removeFromParentAndDestroyCleanin...
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: 179120
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-30 09:00 PDT by Antti Koivisto
Modified: 2017-11-15 12:34 PST (History)
10 users (show)

See Also:


Attachments
patch (25.40 KB, patch)
2017-10-31 06:16 PDT, Antti Koivisto
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-elcapitan (1.09 MB, application/zip)
2017-10-31 07:14 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.33 MB, application/zip)
2017-10-31 07:21 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-elcapitan (1.85 MB, application/zip)
2017-10-31 07:31 PDT, Build Bot
no flags Details
patch (32.81 KB, patch)
2017-10-31 07:35 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (32.75 KB, patch)
2017-10-31 09:27 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (32.94 KB, patch)
2017-10-31 10:15 PDT, Antti Koivisto
ggaren: review+
Details | Formatted Diff | Diff
patch (32.97 KB, patch)
2017-10-31 12:16 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch (35.21 KB, patch)
2017-11-02 03:31 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-30 09:00:53 PDT
Treat continuation similarly to other anonymous wrappers. This makes things more understandable and allows removal of some questionable code in RenderBlock::takeChild.
Comment 1 Antti Koivisto 2017-10-31 06:16:29 PDT
Created attachment 325433 [details]
patch
Comment 2 Build Bot 2017-10-31 07:14:41 PDT
Comment on attachment 325433 [details]
patch

Attachment 325433 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/5050236

New failing tests:
fast/ruby/rubyDOM-remove-rt1.html
fast/ruby/float-overhang-from-ruby-text.html
Comment 3 Build Bot 2017-10-31 07:14:42 PDT
Created attachment 325434 [details]
Archive of layout-test-results from ews100 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 4 Build Bot 2017-10-31 07:21:51 PDT
Comment on attachment 325433 [details]
patch

Attachment 325433 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/5050256

New failing tests:
fast/ruby/rubyDOM-remove-rt1.html
fast/ruby/float-overhang-from-ruby-text.html
Comment 5 Build Bot 2017-10-31 07:21:52 PDT
Created attachment 325435 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 6 Build Bot 2017-10-31 07:31:06 PDT
Comment on attachment 325433 [details]
patch

Attachment 325433 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/5050252

New failing tests:
fast/ruby/rubyDOM-remove-rt1.html
fast/ruby/float-overhang-from-ruby-text.html
Comment 7 Build Bot 2017-10-31 07:31:08 PDT
Created attachment 325436 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 8 Antti Koivisto 2017-10-31 07:35:47 PDT
Created attachment 325437 [details]
patch
Comment 9 Antti Koivisto 2017-10-31 09:27:53 PDT
Created attachment 325449 [details]
patch
Comment 10 Antti Koivisto 2017-10-31 10:15:14 PDT
Created attachment 325456 [details]
patch
Comment 11 Geoffrey Garen 2017-10-31 11:09:51 PDT
Comment on attachment 325456 [details]
patch

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

r=me

> Source/WebCore/rendering/RenderBoxModelObject.cpp:81
> +struct RenderBoxModelObject::ContinuationChainNode {

You should use MAKE_FAST_ALLOCATED here.
Comment 12 Antti Koivisto 2017-10-31 12:16:40 PDT
Created attachment 325466 [details]
patch
Comment 13 WebKit Commit Bot 2017-11-01 00:57:06 PDT
Comment on attachment 325466 [details]
patch

Clearing flags on attachment: 325466

Committed r224273: <https://trac.webkit.org/changeset/224273>
Comment 14 WebKit Commit Bot 2017-11-01 00:57:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 15 WebKit Commit Bot 2017-11-01 09:26:22 PDT
Re-opened since this is blocked by bug 179120
Comment 16 Antti Koivisto 2017-11-02 02:48:45 PDT
Guard malloc crashes were due to code in RenderRubyRun::takeChild where it destroys itself (similar to RenderBlock one).
Comment 17 Antti Koivisto 2017-11-02 03:31:10 PDT
Created attachment 325701 [details]
patch
Comment 18 WebKit Commit Bot 2017-11-02 04:31:10 PDT
Comment on attachment 325701 [details]
patch

Clearing flags on attachment: 325701

Committed r224327: <https://trac.webkit.org/changeset/224327>
Comment 19 WebKit Commit Bot 2017-11-02 04:31:12 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Ryan Haddad 2017-11-02 08:47:39 PDT
30 LayoutTests are hitting an assertion failure after re-landing this change:

ASSERTION FAILED: !continuationChainNode.next->renderer->firstChild()
/Volumes/Data/slave/sierra-debug/build/Source/WebCore/rendering/RenderBoxModelObject.cpp(2539) : void WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations()
1   0x123078b5d WTFCrash
2   0x11831dd02 WebCore::RenderBoxModelObject::removeAndDestroyAllContinuations()
3   0x1182f4490 WebCore::RenderBoxModelObject::willBeDestroyed()
4   0x1183b6048 WebCore::RenderInline::willBeDestroyed()
5   0x11846ba3e WebCore::RenderObject::destroy()
6   0x11846b8f9 WebCore::RenderObjectDeleter::operator()(WebCore::RenderObject*) const
7   0x118341c07 WebCore::RenderElement::removeAndDestroyChild(WebCore::RenderObject&)
8   0x11846497c WebCore::RenderObject::removeFromParentAndDestroy()
9   0x11847111f WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers()
10  0x118673ceb WebCore::RenderTreeUpdater::tearDownRenderers(WebCore::Element&, WebCore::RenderTreeUpdater::TeardownType)::$_8::operator()(unsigned int) const
11  0x118671393 WebCore::RenderTreeUpdater::tearDownRenderers(WebCore::Element&, WebCore::RenderTreeUpdater::TeardownType)
12  0x118673bc7 WebCore::RenderTreeUpdater::tearDownRenderers(WebCore::Element&)
13  0x11747f7ec WebCore::Document::destroyRenderTree()
14  0x11747fb7a WebCore::Document::prepareForDestruction()
15  0x117c9e180 WebCore::Frame::setView(WTF::RefPtr<WebCore::FrameView>&&)
16  0x117ca0753 WebCore::Frame::createView(WebCore::IntSize const&, WebCore::Color const&, bool, WebCore::IntSize const&, WebCore::IntRect const&, bool, WebCore::ScrollbarMode, bool, WebCore::ScrollbarMode, bool)
17  0x10d2af772 WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage()
18  0x117b263d6 WebCore::FrameLoader::transitionToCommitted(WebCore::CachedPage*)
19  0x117b2546a WebCore::FrameLoader::commitProvisionalLoad()
20  0x117adad2c WebCore::DocumentLoader::commitIfReady()
21  0x117adb052 WebCore::DocumentLoader::finishedLoading()
22  0x117ae2ba5 WebCore::DocumentLoader::maybeLoadEmpty()
23  0x117ae2d2d WebCore::DocumentLoader::startLoadingMainResource()
24  0x117b40814 WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, bool, WebCore::AllowNavigationToInvalidURL)::$_8::operator()() const
25  0x117b40559 WTF::Function<void ()>::CallableWrapper<WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, bool, WebCore::AllowNavigationToInvalidURL)::$_8>::call()
26  0x11585effb WTF::Function<void ()>::operator()() const
27  0x117b237cd WebCore::FrameLoader::continueLoadAfterNavigationPolicy(WebCore::ResourceRequest const&, WebCore::FormState*, bool, WebCore::AllowNavigationToInvalidURL)
28  0x117b3f148 WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WebCore::FormState*, WebCore::AllowNavigationToInvalidURL)::$_6::operator()(WebCore::ResourceRequest const&, WebCore::FormState*, bool) const
29  0x117b3f0d2 WTF::Function<void (WebCore::ResourceRequest const&, WebCore::FormState*, bool)>::CallableWrapper<WebCore::FrameLoader::loadWithDocumentLoader(WebCore::DocumentLoader*, WebCore::FrameLoadType, WebCore::FormState*, WebCore::AllowNavigationToInvalidURL)::$_6>::call(WebCore::ResourceRequest const&, WebCore::FormState*, bool)
30  0x117b6b92d WTF::Function<void (WebCore::ResourceRequest const&, WebCore::FormState*, bool)>::operator()(WebCore::ResourceRequest const&, WebCore::FormState*, bool) const
31  0x117b621b9 WTF::CompletionHandler<void (WebCore::ResourceRequest const&, WebCore::FormState*, bool)>::operator()(WebCore::ResourceRequest const&, WebCore::FormState*, bool)
LEAK: 1 WebPageProxy

https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r224329%20(3837)/results.html
Comment 21 Antti Koivisto 2017-11-02 08:58:31 PDT
Removed the assertion in https://trac.webkit.org/r224332
Comment 22 Radar WebKit Bug Importer 2017-11-15 12:34:27 PST
<rdar://problem/35567802>