RESOLVED FIXED 225576
IPC testing API should have the ability to send and receive shared memory
https://bugs.webkit.org/show_bug.cgi?id=225576
Summary IPC testing API should have the ability to send and receive shared memory
Ryosuke Niwa
Reported 2021-05-08 23:38:45 PDT
In order to support DisplayList fuzzing, we need the ability to create & receive shared memory.
Attachments
Patch (40.39 KB, patch)
2021-05-09 00:05 PDT, Ryosuke Niwa
no flags
Patch for landing (40.75 KB, patch)
2021-05-09 11:21 PDT, Ryosuke Niwa
ews-feeder: commit-queue-
Ryosuke Niwa
Comment 1 2021-05-09 00:05:05 PDT
Wenson Hsieh
Comment 2 2021-05-09 10:55:55 PDT
Comment on attachment 428113 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428113&action=review > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:108 > + size_t size() { return m_sharedMemory->size(); } Nit - we can make this method const > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:136 > + RefPtr<SharedMemory> m_sharedMemory; Nit - I think this can be a `Ref<SharedMemory> m_sharedMemory;`? > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:376 > + return unwrap(JSValueToObject(context, value, 0)); Nit - use nullptr instead of 0? > Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:294 > +TEST(IPCTestingAPI, CanSendSemaphpre) Nit - CanSendSemaphore
Ryosuke Niwa
Comment 3 2021-05-09 11:08:53 PDT
Thank you for the review! (In reply to Wenson Hsieh from comment #2) > Comment on attachment 428113 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=428113&action=review > > > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:108 > > + size_t size() { return m_sharedMemory->size(); } > > Nit - we can make this method const Done. > > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:136 > > + RefPtr<SharedMemory> m_sharedMemory; > > Nit - I think this can be a `Ref<SharedMemory> m_sharedMemory;`? Yeah, it really should be but SharedMemory::allocate returns RefPtr :( I guess I'm gonna just dereference RefPtr there. > > Source/WebKit/WebProcess/WebPage/IPCTestingAPI.cpp:376 > > + return unwrap(JSValueToObject(context, value, 0)); > > Nit - use nullptr instead of 0? Fixed. > > Tools/TestWebKitAPI/Tests/WebKitCocoa/IPCTestingAPI.mm:294 > > +TEST(IPCTestingAPI, CanSendSemaphpre) > > Nit - CanSendSemaphore Oh oops, fixed.
Ryosuke Niwa
Comment 4 2021-05-09 11:21:26 PDT
Created attachment 428130 [details] Patch for landing
EWS
Comment 5 2021-05-09 11:57:29 PDT
Committed r277250 (237519@main): <https://commits.webkit.org/237519@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428130 [details].
Radar WebKit Bug Importer
Comment 6 2021-05-09 11:58:14 PDT
Note You need to log in before you can comment on or make changes to this bug.