[Webkit-unassigned] [Bug 190449] New: makeWeakPtr() on a derived class breaks if CanMakeWeakPtr<> is not its first base class

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 10 15:22:22 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=190449

            Bug ID: 190449
           Summary: makeWeakPtr() on a derived class breaks if
                    CanMakeWeakPtr<> is not its first base class
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: simon.fraser at apple.com
                CC: lforschler at apple.com

I changed RenderLayer to:

class RenderLayer final : public RenderLayerNode, public ScrollableArea {
...
}

where RenderLayerNode is a base class with virtual members
and ScrollableArea is:

class ScrollableArea : public CanMakeWeakPtr<ScrollableArea> {
...
}

This triggered crashes in code that referenced weak ptrs to RenderLayers. It seems that weak_reference_downcast() assumes that the pointers are reinterpret-castable, but that's not always true.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181010/ddda5f62/attachment-0001.html>


More information about the webkit-unassigned mailing list