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

Side by Side Diff: ppapi/shared_impl/var_value_conversions_unittest.cc

Issue 19492014: PPAPI: Purposely leak ProxyLock, fix shutdown race (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove static initializer Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/shared_impl/var_tracker_unittest.cc ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ppapi/shared_impl/var_value_conversions.h" 5 #include "ppapi/shared_impl/var_value_conversions.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 135
136 class VarValueConversionsTest : public testing::Test { 136 class VarValueConversionsTest : public testing::Test {
137 public: 137 public:
138 VarValueConversionsTest() { 138 VarValueConversionsTest() {
139 } 139 }
140 virtual ~VarValueConversionsTest() { 140 virtual ~VarValueConversionsTest() {
141 } 141 }
142 142
143 // testing::Test implementation. 143 // testing::Test implementation.
144 virtual void SetUp() { 144 virtual void SetUp() {
145 ProxyLock::EnableLockingOnThreadForTest();
145 ProxyLock::Acquire(); 146 ProxyLock::Acquire();
146 } 147 }
147 virtual void TearDown() { 148 virtual void TearDown() {
148 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); 149 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty());
149 ProxyLock::Release(); 150 ProxyLock::Release();
150 } 151 }
151 152
152 private: 153 private:
153 TestGlobals globals_; 154 TestGlobals globals_;
154 }; 155 };
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 const base::Value* value = NULL; 387 const base::Value* value = NULL;
387 ASSERT_TRUE(list_value.Get(i, &value)); 388 ASSERT_TRUE(list_value.Get(i, &value));
388 ASSERT_TRUE(Equals(*value, vars[i])); 389 ASSERT_TRUE(Equals(*value, vars[i]));
389 390
390 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(vars[i]); 391 PpapiGlobals::Get()->GetVarTracker()->ReleaseVar(vars[i]);
391 } 392 }
392 } 393 }
393 } 394 }
394 395
395 } // namespace ppapi 396 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/var_tracker_unittest.cc ('k') | ppapi/thunk/enter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698