In order to support DisplayList fuzzing, we need the ability to create & receive shared memory.
Created attachment 428113 [details] Patch
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
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.
Created attachment 428130 [details] Patch for landing
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].
<rdar://problem/77717870>