fix: use a WeakPtr so we do not UAF the store in FunctionLifetimeMonitor#22056
fix: use a WeakPtr so we do not UAF the store in FunctionLifetimeMonitor#22056MarshallOfSound merged 1 commit intomasterfrom
Conversation
4502022 to
a80b985
Compare
|
|
||
| private: | ||
| context_bridge::RenderFramePersistenceStore* store_; | ||
| base::WeakPtr<context_bridge::RenderFramePersistenceStore> store_; |
There was a problem hiding this comment.
Would it be reasonable to eagerly delete the FLMs when the store is deleted? rather than leaving them hanging around until they happen to wake up and notice they're useless now since their store is gone
There was a problem hiding this comment.
@nornagon They will all be deleted at the same time (give or take some milliseconds). The store is only ripped out when the context is destroyed. The function monitors will be ripped apart during the final GC run
|
Release Notes Persisted
|
|
I have automatically backported this PR to "7-1-x", please check out #22112 |
|
I have automatically backported this PR to "9-x-y", please check out #22113 |
|
I have automatically backported this PR to "8-x-y", please check out #22114 |
We already did this for the ObjectLifeMonitor, should also do it for the FunctionLifetimeMonitor
Notes: Fixed issue where renderers could crash during GC when using the
contextBridgemodule