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

Unified Diff: ppapi/shared_impl/var_tracker.cc

Issue 8872065: Pepper: Var keeps invalid var_id if VarTracker release it and there is another reference (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: another approach to reset var_id on erase Created 9 years 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
« ppapi/shared_impl/var.h ('K') | « ppapi/shared_impl/var.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/var_tracker.cc
diff --git a/ppapi/shared_impl/var_tracker.cc b/ppapi/shared_impl/var_tracker.cc
index 7f7157e7954af162a29a72f183d8c97d5368e564..d95a759069169bdb2a44fe384b6b74254efcd3e9 100644
--- a/ppapi/shared_impl/var_tracker.cc
+++ b/ppapi/shared_impl/var_tracker.cc
@@ -100,6 +100,7 @@ bool VarTracker::ReleaseVar(int32 var_id) {
} else {
// All other var types can just be released.
DCHECK(info.track_with_no_reference_count == 0);
+ info.var->ResetVarID();
live_vars_.erase(found);
}
}
« ppapi/shared_impl/var.h ('K') | « ppapi/shared_impl/var.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698