Skip to content

Commit

Permalink
uaf.cpp: add pref_change_registrar_ test
Browse files Browse the repository at this point in the history
  • Loading branch information
thypon authored Jul 17, 2023
1 parent 88fe3d1 commit 2def86b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions t3sts/semgrep_rules/uaf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,9 @@ v8::Local<v8::Promise> uaf(v8::Isolate* isolate) {
base::BindRepeating(&BraveLeoAssistantHandler::HandleInitLeoAssistant,
base::Unretained(this)));

// ok: chromium-unretained-uaf
pref_change_registrar_.Add(
prefs::kEnabled,
base::BindRepeating(&AdsServiceImpl::OnEnabledPrefChanged,
base::Unretained(this)));
}

0 comments on commit 2def86b

Please sign in to comment.