fix: use a WeakPtr so we do not UAF the store in FunctionLifetimeMonitor (#22056)
This commit is contained in:
parent
43592f8b71
commit
dafbf04b9a
2 changed files with 21 additions and 11 deletions
|
@ -50,6 +50,10 @@ class RenderFramePersistenceStore final : public content::RenderFrameObserver {
|
|||
v8::Local<v8::Value> proxy_value);
|
||||
v8::MaybeLocal<v8::Value> GetCachedProxiedObject(v8::Local<v8::Value> from);
|
||||
|
||||
base::WeakPtr<RenderFramePersistenceStore> GetWeakPtr() {
|
||||
return weak_factory_.GetWeakPtr();
|
||||
}
|
||||
|
||||
private:
|
||||
// func_id ==> { function, owning_context }
|
||||
std::map<size_t, FunctionContextPair> functions_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue