Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4387)

Unified Diff: chrome/common/extensions/matcher/url_matcher_factory.h

Issue 10398054: Improve documentation of potential memory leaks in URLMatcherFactory (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/matcher/url_matcher.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/matcher/url_matcher_factory.h
diff --git a/chrome/common/extensions/matcher/url_matcher_factory.h b/chrome/common/extensions/matcher/url_matcher_factory.h
index 138281430328e99a22cb84591859ea18bbbcd5a1..ade3508326523decb0f82ead565a11ee53553911 100644
--- a/chrome/common/extensions/matcher/url_matcher_factory.h
+++ b/chrome/common/extensions/matcher/url_matcher_factory.h
@@ -25,6 +25,11 @@ class URLMatcherFactory {
// by the extension, |id| is the identifier assigned to the created
// URLMatcherConditionSet. In case of an error, |error| is set to contain
// an error message.
+ //
+ // Note: In case this function fails or if you don't register the
+ // URLMatcherConditionSet to the URLMatcher, you need to call
+ // URLMatcher::ClearUnusedConditionSets() on the URLMatcher that owns this
+ // URLMatcherFactory. Otherwise you leak memory.
static scoped_refptr<URLMatcherConditionSet> CreateFromURLFilterDictionary(
URLMatcherConditionFactory* url_matcher_condition_factory,
const base::DictionaryValue* url_filter_dict,
« no previous file with comments | « chrome/common/extensions/matcher/url_matcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698