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

Side by Side Diff: runtime/bin/reference_counting.h

Issue 2833073002: Stoppp using trippple consonants (Closed)
Patch Set: More spolling Created 3 years, 8 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
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | runtime/lib/convert_patch.dart » ('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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef RUNTIME_BIN_REFERENCE_COUNTING_H_ 5 #ifndef RUNTIME_BIN_REFERENCE_COUNTING_H_
6 #define RUNTIME_BIN_REFERENCE_COUNTING_H_ 6 #define RUNTIME_BIN_REFERENCE_COUNTING_H_
7 7
8 #include "vm/atomic.h" 8 #include "vm/atomic.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 friend class RefCntReleaseScope<Derived>; 75 friend class RefCntReleaseScope<Derived>;
76 DISALLOW_COPY_AND_ASSIGN(ReferenceCounted); 76 DISALLOW_COPY_AND_ASSIGN(ReferenceCounted);
77 }; 77 };
78 78
79 #if defined(DEBUG) 79 #if defined(DEBUG)
80 template <class Derived> 80 template <class Derived>
81 intptr_t ReferenceCounted<Derived>::instances_ = 0; 81 intptr_t ReferenceCounted<Derived>::instances_ = 0;
82 #endif 82 #endif
83 83
84 // Creates a scope at the end of which a reference counted object is 84 // Creates a scope at the end of which a reference counted object is
85 // Released. This is useful for reference counted objects recieved by the IO 85 // Released. This is useful for reference counted objects received by the IO
86 // Service, which have already been Retained E.g.: 86 // Service, which have already been Retained E.g.:
87 // 87 //
88 // CObject* Foo::FooRequest(const CObjectArray& request) { 88 // CObject* Foo::FooRequest(const CObjectArray& request) {
89 // Foo* foo = CObjectToFoo(request[0]); 89 // Foo* foo = CObjectToFoo(request[0]);
90 // RefCntReleaseScope<Foo> rs(foo); 90 // RefCntReleaseScope<Foo> rs(foo);
91 // ... 91 // ...
92 // } 92 // }
93 template <class Target> 93 template <class Target>
94 class RefCntReleaseScope { 94 class RefCntReleaseScope {
95 public: 95 public:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 ReferenceCounted<Target>* target_; 165 ReferenceCounted<Target>* target_;
166 166
167 DISALLOW_ALLOCATION(); 167 DISALLOW_ALLOCATION();
168 DISALLOW_COPY_AND_ASSIGN(RetainedPointer); 168 DISALLOW_COPY_AND_ASSIGN(RetainedPointer);
169 }; 169 };
170 170
171 } // namespace bin 171 } // namespace bin
172 } // namespace dart 172 } // namespace dart
173 173
174 #endif // RUNTIME_BIN_REFERENCE_COUNTING_H_ 174 #endif // RUNTIME_BIN_REFERENCE_COUNTING_H_
OLDNEW
« no previous file with comments | « runtime/bin/eventhandler_win.h ('k') | runtime/lib/convert_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698