diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-14 10:08:32 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-14 10:08:32 +0000 |
commit | bca22bb6d9b12c3370f05336a7cf896b7be11612 (patch) | |
tree | 7a84d1c6b7cbb38283b7e7e96ec6261087fb87b4 /ppapi/shared_impl | |
parent | 355415ed9e54b0303fad25f68e5234b0b85c253a (diff) | |
download | chromium_src-bca22bb6d9b12c3370f05336a7cf896b7be11612.zip chromium_src-bca22bb6d9b12c3370f05336a7cf896b7be11612.tar.gz chromium_src-bca22bb6d9b12c3370f05336a7cf896b7be11612.tar.bz2 |
Reverting half the checkins that are suspected of breaking the world.
Revert 114384 - Var keeps invalid var_id if VarTracker release it and there is
another reference.
When VarTracker remove PP_Var from VarMap, it release its Var object
if needed, but never reset var_id stored in Var object. Then, if Var's
reference count is not 1, Var continue to exist with invalid var_id until
the last reference is released.
BUG=87310
TEST=ui_tests --gtest_filter='PPAPITest.WebSocket_*'
Review URL: http://codereview.chromium.org/8872065
TBR=toyoshim@chromium.org
Review URL: http://codereview.chromium.org/8933025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl')
-rw-r--r-- | ppapi/shared_impl/var.h | 6 | ||||
-rw-r--r-- | ppapi/shared_impl/var_tracker.cc | 1 |
2 files changed, 0 insertions, 7 deletions
diff --git a/ppapi/shared_impl/var.h b/ppapi/shared_impl/var.h index 0ebe8b6..988898a0 100644 --- a/ppapi/shared_impl/var.h +++ b/ppapi/shared_impl/var.h @@ -17,7 +17,6 @@ namespace ppapi { class NPObjectVar; class ProxyObjectVar; class StringVar; -class VarTracker; // Var ------------------------------------------------------------------------- @@ -49,8 +48,6 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { int32 GetExistingVarID() const; protected: - friend class VarTracker; - Var(); // Returns the unique ID associated with this string or object, creating it @@ -65,9 +62,6 @@ class PPAPI_SHARED_EXPORT Var : public base::RefCounted<Var> { // before. This is used in cases where the ID is generated externally. void AssignVarID(int32 id); - // Reset the assigned object ID. - void ResetVarID() { AssignVarID(0); }; - private: // This will be 0 if no ID has been assigned (this happens lazily). int32 var_id_; diff --git a/ppapi/shared_impl/var_tracker.cc b/ppapi/shared_impl/var_tracker.cc index d95a759..7f7157e 100644 --- a/ppapi/shared_impl/var_tracker.cc +++ b/ppapi/shared_impl/var_tracker.cc @@ -100,7 +100,6 @@ 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); } } |