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

Side by Side Diff: ppapi/proxy/raw_var_data_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/proxy/ppapi_proxy_test.cc ('k') | ppapi/shared_impl/ppapi_globals.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/proxy/raw_var_data.h" 5 #include "ppapi/proxy/raw_var_data.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 19 matching lines...) Expand all
30 IPC::ParamTraits<SerializedHandle>::Write(m, handle); 30 IPC::ParamTraits<SerializedHandle>::Write(m, handle);
31 } 31 }
32 32
33 class RawVarDataTest : public testing::Test { 33 class RawVarDataTest : public testing::Test {
34 public: 34 public:
35 RawVarDataTest() {} 35 RawVarDataTest() {}
36 ~RawVarDataTest() {} 36 ~RawVarDataTest() {}
37 37
38 // testing::Test implementation. 38 // testing::Test implementation.
39 virtual void SetUp() { 39 virtual void SetUp() {
40 ProxyLock::EnableLockingOnThreadForTest();
40 ProxyLock::Acquire(); 41 ProxyLock::Acquire();
41 } 42 }
42 virtual void TearDown() { 43 virtual void TearDown() {
43 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty()); 44 ASSERT_TRUE(PpapiGlobals::Get()->GetVarTracker()->GetLiveVars().empty());
44 ProxyLock::Release(); 45 ProxyLock::Release();
45 } 46 }
46 47
47 private: 48 private:
48 TestGlobals globals_; 49 TestGlobals globals_;
49 }; 50 };
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 181
181 // Array with self references. 182 // Array with self references.
182 array->Set(index, release_array.get()); 183 array->Set(index, release_array.get());
183 ASSERT_FALSE(WriteAndRead(release_array.get(), &result)); 184 ASSERT_FALSE(WriteAndRead(release_array.get(), &result));
184 // Break the self reference. 185 // Break the self reference.
185 array->Set(index, PP_MakeUndefined()); 186 array->Set(index, PP_MakeUndefined());
186 } 187 }
187 188
188 } // namespace proxy 189 } // namespace proxy
189 } // namespace ppapi 190 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | ppapi/shared_impl/ppapi_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698