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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 10 17:41:40 PST 2020


Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
 Attachment #387396|review?                     |review-
              Flags|                            |

--- Comment #6 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 387396
  --> https://bugs.webkit.org/attachment.cgi?id=387396

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/20200111/9cadb7fd/attachment-0001.htm>

More information about the webkit-unassigned mailing list