Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate serialization for NSPresentationIntent #24035

Conversation

mscottapple
Copy link
Contributor

@mscottapple mscottapple commented Feb 7, 2024

089245f

Generate serialization for NSPresentationIntent
https://bugs.webkit.org/show_bug.cgi?id=268779
rdar://109121874

Reviewed by achristensen07 (Alex Christensen).

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):
(IPC::shouldEnableStrictMode):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.h: Added.
(WebKit::CoreIPCPresentationIntent::CoreIPCPresentationIntent):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.mm: Added.
(WebKit::CoreIPCPresentationIntent::CoreIPCPresentationIntent):
(WebKit::CoreIPCPresentationIntent::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/274269@main

1dd1fd2

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe   πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
  πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios   πŸ§ͺ mac-wk2 βœ… πŸ§ͺ gtk-wk2
  πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim
  πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim

@mscottapple mscottapple self-assigned this Feb 7, 2024
@mscottapple mscottapple added the WebKit Process Model Bugs related to WebKit's multi-process architecture label Feb 7, 2024
Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm Outdated Show resolved Hide resolved
Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.h Outdated Show resolved Hide resolved
Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.h Outdated Show resolved Hide resolved
Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.mm Outdated Show resolved Hide resolved
Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.mm Outdated Show resolved Hide resolved
Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.mm Outdated Show resolved Hide resolved
result = [NSPresentationIntent thematicBreakIntentWithIdentity:m_identity nestedInsideIntent:parent];
break;
case NSPresentationIntentKindTable:
columnAlignments = [[NSMutableArray alloc] initWithCapacity:m_columnAlignments.size()];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a memory leak.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, because of the [columnAlignments release] that was further down, but I've changed to use smart pointers to be consistent with The WK Wayβ„’.

@mscottapple mscottapple force-pushed the eng/Generate-serialization-for-NSPresentationIntent branch from c74037b to 7abaabc Compare February 7, 2024 23:13
@mscottapple mscottapple force-pushed the eng/Generate-serialization-for-NSPresentationIntent branch from 7abaabc to 4cba283 Compare February 7, 2024 23:20

int64_t m_intentKind { 0 };
int64_t m_identity { 0 };
std::unique_ptr<CoreIPCPresentationIntent> m_parentIntent { nullptr };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

std::unique_ptr has a default constructor that initializes the pointer, so { nullptr } is unnecessary.


#if PLATFORM(COCOA)

#include "ArgumentCodersCocoa.h"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also seems unnecessary. <wtf/ArgumentCoder.h> should be sufficient.

@mscottapple mscottapple force-pushed the eng/Generate-serialization-for-NSPresentationIntent branch from 4cba283 to 1dd1fd2 Compare February 8, 2024 02:04
@achristensen07 achristensen07 added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Feb 8, 2024
https://bugs.webkit.org/show_bug.cgi?id=268779
rdar://109121874

Reviewed by achristensen07 (Alex Christensen).

* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.h:
* Source/WebKit/Shared/Cocoa/ArgumentCodersCocoa.mm:
(IPC::typeFromObject):
(IPC::shouldEnableStrictMode):
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.h:
* Source/WebKit/Shared/Cocoa/CoreIPCNSCFObject.mm:
(WebKit::valueFromID):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.h: Added.
(WebKit::CoreIPCPresentationIntent::CoreIPCPresentationIntent):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.mm: Added.
(WebKit::CoreIPCPresentationIntent::CoreIPCPresentationIntent):
(WebKit::CoreIPCPresentationIntent::toID const):
* Source/WebKit/Shared/Cocoa/CoreIPCPresentationIntent.serialization.in: Added.
* Source/WebKit/Shared/Cocoa/CoreIPCTypes.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/IPC/IPCSerialization.mm:
(TEST):

Canonical link: https://commits.webkit.org/274269@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Generate-serialization-for-NSPresentationIntent branch from 1dd1fd2 to 089245f Compare February 8, 2024 05:48
@webkit-commit-queue
Copy link
Collaborator

Committed 274269@main (089245f): https://commits.webkit.org/274269@main

Reviewed commits have been landed. Closing PR #24035 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 089245f into WebKit:main Feb 8, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebKit Process Model Bugs related to WebKit's multi-process architecture
Projects
None yet
4 participants