Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid contextBridge double free on garbage collection #21736

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -47,9 +47,11 @@ class CachedProxyLifeMonitor final : public ObjectLifeMonitor {
}
if (node_->prev) {
node_->prev->next = node_->next;
node_->prev = nullptr;
}
if (node_->next) {
node_->next->prev = node_->prev;
node_->next = nullptr;
}
if (!node_->prev && !node_->next) {
// Must be a single length linked list
Expand All @@ -76,11 +78,7 @@ WeakGlobalPairNode::WeakGlobalPairNode(WeakGlobalPair pair) {
this->pair = std::move(pair);
}

WeakGlobalPairNode::~WeakGlobalPairNode() {
if (next) {
delete next;
}
}
WeakGlobalPairNode::~WeakGlobalPairNode() {}

RenderFramePersistenceStore::RenderFramePersistenceStore(
content::RenderFrame* render_frame)
Expand Down