[Webkit-unassigned] [Bug 206099] Deploy Ref and RefPtr in DOMWindow::scroll* functions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 13 09:19:59 PST 2020


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

--- Comment #10 from Jack <shihchieh_lee at apple.com> ---
Thanks! Yes, there is a pattern in this file that can be abstracted out.

(In reply to Simon Fraser (smfr) from comment #6)
> Comment on attachment 387396 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=387396&action=review
> 
> > Source/WebCore/page/DOMWindow.cpp:1644
> > +    auto frame = makeRefPtr(this->frame());
> > +    if (!frame)
> >          return;
> >  
> > +    auto view = makeRefPtr(frame->view());
> > +    if (!view)
> > +        return;
> 
> We repeat this pattern in various accessors in this file. It's so common I
> think we should share code for it.
> 
> I also think we should limit 'view' and 'frame' to a scope that ends before
> the updateLayoutIgnorePendingStylesheets call. I see no reason to keep a ref
> to these across the updateLayoutIgnorePendingStylesheets call.

-- 
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/20200113/b1f94b85/attachment.htm>


More information about the webkit-unassigned mailing list