Bug 233772 - MessageChannel::port1() / port2() should return references instead of pointers
Summary: MessageChannel::port1() / port2() should return references instead of pointers
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 230382
  Show dependency treegraph
 
Reported: 2021-12-02 10:36 PST by Chris Dumez
Modified: 2021-12-02 15:05 PST (History)
11 users (show)

See Also:


Attachments
Patch (5.59 KB, patch)
2021-12-02 10:38 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.69 KB, patch)
2021-12-02 10:39 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.68 KB, patch)
2021-12-02 10:43 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.71 KB, patch)
2021-12-02 12:27 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2021-12-02 10:36:29 PST
MessageChannel::port1() / port2() should return references instead of pointers.
Comment 1 Chris Dumez 2021-12-02 10:38:17 PST
Created attachment 445738 [details]
Patch
Comment 2 Chris Dumez 2021-12-02 10:39:51 PST
Created attachment 445740 [details]
Patch
Comment 3 Chris Dumez 2021-12-02 10:43:09 PST
Created attachment 445742 [details]
Patch
Comment 4 Chris Dumez 2021-12-02 12:27:13 PST
Created attachment 445760 [details]
Patch
Comment 5 EWS 2021-12-02 14:22:56 PST
Committed r286453 (244795@main): <https://commits.webkit.org/244795@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 445760 [details].
Comment 6 Radar WebKit Bug Importer 2021-12-02 14:23:36 PST
<rdar://problem/85989068>
Comment 7 Darin Adler 2021-12-02 14:42:56 PST
Comment on attachment 445760 [details]
Patch

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

> Source/WebCore/dom/MessageChannel.h:43
> +    MessagePort& port1() const { return m_ports.first.get(); }
> +    MessagePort& port2() const { return m_ports.second.get(); }

I think the get() calls here are optional. Probably compiles and works without them.
Comment 8 Chris Dumez 2021-12-02 15:05:33 PST
(In reply to Darin Adler from comment #7)
> Comment on attachment 445760 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=445760&action=review
> 
> > Source/WebCore/dom/MessageChannel.h:43
> > +    MessagePort& port1() const { return m_ports.first.get(); }
> > +    MessagePort& port2() const { return m_ports.second.get(); }
> 
> I think the get() calls here are optional. Probably compiles and works
> without them.

Indeed, fixed it via <https://commits.webkit.org/r286456>. Thanks.