WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226595
[Hardening] Stop storing raw pointers inside WebIDBServer::m_connections
https://bugs.webkit.org/show_bug.cgi?id=226595
Summary
[Hardening] Stop storing raw pointers inside WebIDBServer::m_connections
Chris Dumez
Reported
2021-06-03 13:25:00 PDT
Stop storing raw pointers inside WebIDBServer::m_connections and use a WeakHashSet instead.
Attachments
Patch
(4.82 KB, patch)
2021-06-03 13:29 PDT
,
Chris Dumez
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2021-06-03 13:29:00 PDT
Created
attachment 430495
[details]
Patch
Ryosuke Niwa
Comment 2
2021-06-03 13:42:38 PDT
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.
Chris Dumez
Comment 3
2021-06-03 13:44:34 PDT
(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
Ryosuke Niwa
Comment 4
2021-06-03 13:52:54 PDT
(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.
EWS
Comment 5
2021-06-03 14:47:28 PDT
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]
.
Radar WebKit Bug Importer
Comment 6
2021-06-03 14:48:22 PDT
<
rdar://problem/78837612
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug