Bug 177429 - Add WeakPtr support to RenderObject.
Summary: Add WeakPtr support to RenderObject.
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: zalan
URL:
Keywords: InRadar
Depends on: 177389
Blocks:
  Show dependency treegraph
 
Reported: 2017-09-25 06:14 PDT by zalan
Modified: 2017-09-29 11:32 PDT (History)
8 users (show)

See Also:


Attachments
Patch (11.30 KB, patch)
2017-09-25 06:57 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (11.10 KB, patch)
2017-09-29 09:16 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2017-09-25 06:14:56 PDT
and remove it from the subclasses.
Comment 1 zalan 2017-09-25 06:15:36 PDT
This is related to bug 177389
Comment 2 Radar WebKit Bug Importer 2017-09-25 06:16:57 PDT
<rdar://problem/34625212>
Comment 3 zalan 2017-09-25 06:57:52 PDT
Created attachment 321679 [details]
Patch
Comment 4 zalan 2017-09-29 09:16:42 PDT
Created attachment 322188 [details]
Patch
Comment 5 WebKit Commit Bot 2017-09-29 10:51:02 PDT
Comment on attachment 322188 [details]
Patch

Clearing flags on attachment: 322188

Committed r222653: <http://trac.webkit.org/changeset/222653>
Comment 6 WebKit Commit Bot 2017-09-29 10:51:05 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Antti Koivisto 2017-09-29 11:22:04 PDT
Comment on attachment 322188 [details]
Patch

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

> Source/WebCore/rendering/RenderMultiColumnFlow.cpp:441
> +            m_spannerMap.add(placeholder.spanner(), placeholder.createWeakPtr<RenderMultiColumnSpannerPlaceholder>());

This is bit awkward. Could we have a standalone template function so we could just do

makeWeakPtr(placeholder) 

and get correctly typed WeakPtr automatically?
Comment 8 Geoffrey Garen 2017-09-29 11:32:21 PDT
> > Source/WebCore/rendering/RenderMultiColumnFlow.cpp:441
> > +            m_spannerMap.add(placeholder.spanner(), placeholder.createWeakPtr<RenderMultiColumnSpannerPlaceholder>());
> 
> This is bit awkward. Could we have a standalone template function so we
> could just do
> 
> makeWeakPtr(placeholder) 
> 
> and get correctly typed WeakPtr automatically?

Totally!

Maybe we should also change the interface so that WeakPtrFactory vends WeakReference<T>&  instead of WeakPtr<T> and WeakPtr<T> automatically constructs itself, just like RefPtr, using that WeakReference<T>&.