Summary: | [Hardening] Stop storing raw pointers inside WebIDBServer::m_connections | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | achristensen, kkinnunen, rniwa, sihui_liu, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Chris Dumez
2021-06-03 13:25:00 PDT
Created attachment 430495 [details]
Patch
Comment on attachment 430495 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=430495&action=review > Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h:106 > + WeakHashSet<IPC::Connection> m_connections; // Only used on the main thread. It's unfortunate that we can't assert this. (In reply to Ryosuke Niwa from comment #2) > Comment on attachment 430495 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=430495&action=review > > > Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h:106 > > + WeakHashSet<IPC::Connection> m_connections; // Only used on the main thread. > > It's unfortunate that we can't assert this. Well, we do have assertions in the places where it is used. But I agree I wish there was a way to enforce that a particular data member can only be used on the main thread. I guess we could come up with a MainThreadOnly<T> type that has the assertions embedded :P (In reply to Chris Dumez from comment #3) > (In reply to Ryosuke Niwa from comment #2) > > Comment on attachment 430495 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=430495&action=review > > > > > Source/WebKit/NetworkProcess/IndexedDB/WebIDBServer.h:106 > > > + WeakHashSet<IPC::Connection> m_connections; // Only used on the main thread. > > > > It's unfortunate that we can't assert this. > > Well, we do have assertions in the places where it is used. But I agree I > wish there was a way to enforce that a particular data member can only be > used on the main thread. I guess we could come up with a MainThreadOnly<T> > type that has the assertions embedded :P Yeah, that might make sense. Committed r278422 (238446@main): <https://commits.webkit.org/238446@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 430495 [details]. |