Bug 207683 - Replace the usages of (IPC::Attachment fencePort) with IPC::MachPort
Summary: Replace the usages of (IPC::Attachment fencePort) with IPC::MachPort
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: Safari 13
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Peng Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-12 23:08 PST by Peng Liu
Modified: 2020-09-25 15:10 PDT (History)
10 users (show)

See Also:


Attachments
Patch (11.04 KB, patch)
2020-09-21 13:13 PDT, Peng Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peng Liu 2020-02-12 23:08:51 PST
Some IPC messages use IPC::Attachment to carry fence ports, we need to use the class MachPort instead.
Comment 1 Peng Liu 2020-09-21 13:13:05 PDT
Created attachment 409310 [details]
Patch
Comment 2 Daniel Bates 2020-09-21 13:44:24 PDT
Comment on attachment 409310 [details]
Patch

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

This patch looks good.

> Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:795
> +    if (DrawingAreaProxy* drawingArea = m_page->drawingArea())

OK as-is. auto* could be used here too.

> Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.mm:799
> +    m_page->send(Messages::VideoFullscreenManager::SetVideoLayerFrameFenced(contextId, frame, fenceSendRight));

OK as-is.

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:3176
> +void WebPage::setTopContentInsetFenced(float contentInset, const WTF::MachSendRight& machSendRight)

OK as-is. Could be improved a tiny bit by taking by rvalue reference then need to patch up other places in this patch though. The param name sounds a bit ambiguous too and same comment for same param in WebProcess code.

> Source/WebKit/WebProcess/WebPage/WebPage.cpp:3178
> +    m_drawingArea->addFence(machSendRight);

OK as-is. If ^^^ taken then could patch up addFence to take by rvalue reference and move into.
Comment 3 EWS 2020-09-25 15:09:34 PDT
Committed r267599: <https://trac.webkit.org/changeset/267599>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409310 [details].
Comment 4 Radar WebKit Bug Importer 2020-09-25 15:10:20 PDT
<rdar://problem/69596514>