| Summary: | IPC testing API should have the ability to send and receive shared memory | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> | ||||||
| Component: | Tools / Tests | Assignee: | Ryosuke Niwa <rniwa> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, ggaren, koivisto, webkit-bug-importer, wenson_hsieh | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=225537 | ||||||||
| Attachments: |
|
||||||||
|
Description
Ryosuke Niwa
2021-05-08 23:38:45 PDT
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]. |