[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 08:40:58 PST 2020


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

--- Comment #7 from Jack <shihchieh_lee at apple.com> ---
We had the same discussion. In this test case, frame is null after calling
"updateLayoutIgnorePendingStylesheets". Some have concern about using freed frame pointer, so we use the same approach as in other functions.

(In reply to Geoffrey Garen from comment #4)
> Comment on attachment 387396 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=387396&action=review
> 
> > Source/WebCore/page/DOMWindow.cpp:1609
> > +    auto frame = makeRefPtr(this->frame());
> > +    if (!frame)
> > +        return;
> >  
> > -    FrameView* view = frame()->view();
> > +    auto view = makeRefPtr(frame->view());
> >      if (!view)
> >          return;
> 
> In this case, do we even need "frame" and "view" before layout, or should we
> just delete these accesses, and only use the "afterLayout" variants? (Is
> there a specific need to perform these null checks? If so, maybe we should
> just perform them as expressions without saving a local variable at all.)
> 
> > Source/WebCore/page/DOMWindow.cpp:1655
> > +    // Layout may have affected the current frame:
> 
> Can you specify why? For example, is there an event that fires?

-- 
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/20a70df8/attachment.htm>


More information about the webkit-unassigned mailing list