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

Unified Diff: chrome/common/extensions/extension.cc

Issue 10824149: Fix memory leak in ActiveTabPermissionManager. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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/extension.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/extension.cc
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index 231445b197bf1bde9d68646ec0520334b59e83d7..712e65cc20d73c0c638012e57bae432918ef9b1f 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -3829,7 +3829,7 @@ scoped_refptr<const PermissionSet> Extension::GetTabSpecificPermissions(
void Extension::UpdateTabSpecificPermissions(
int tab_id,
- const PermissionSet* permissions) const {
+ scoped_refptr<const PermissionSet> permissions) const {
base::AutoLock auto_lock(runtime_data_lock_);
runtime_data_.UpdateTabSpecificPermissions(tab_id, permissions);
}
@@ -3887,12 +3887,12 @@ scoped_refptr<const PermissionSet>
void Extension::RuntimeData::UpdateTabSpecificPermissions(
int tab_id,
- const PermissionSet* permissions) {
+ scoped_refptr<const PermissionSet> permissions) {
CHECK_GE(tab_id, 0);
if (tab_specific_permissions_.count(tab_id)) {
tab_specific_permissions_[tab_id] = PermissionSet::CreateUnion(
tab_specific_permissions_[tab_id],
- permissions);
+ permissions.get());
} else {
tab_specific_permissions_[tab_id] = permissions;
}
« no previous file with comments | « chrome/common/extensions/extension.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698