Arthur Sonzogni
unread,Mar 15, 2024, 6:16:23 AM3/15/24Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to content-owners, danakj, Ali Hijazi, Bartek Nowierski
Dear Content Owners,
I'm proposing we add unique IDs to the WebContents class to address the issue of dangling pointers.
Given the centrality of WebContents, I suspect others have considered this approach. Do you know if we are pushing back against it?
Context: Following the
MiraclePtr rewrite for containers, we know about dangling pointers in
std::vector, std::set, std::map, etc... For instance, tests are keeping track of the set of deleted WebContents using dangling pointers. This is not ideal in general, because addresses are reused...
WeakPtr doesn't address this use case, because they are null after invalidation.
Note: I am not even talking about introducing a ID => WebContents* function. This is an orthogonal question.