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

Side by Side Diff: third_party/WebKit/Source/core/style/DataPersistent.h

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef DataPersistent_h 5 #ifndef DataPersistent_h
6 #define DataPersistent_h 6 #define DataPersistent_h
7 7
8 #include <memory>
8 #include "platform/heap/Handle.h" 9 #include "platform/heap/Handle.h"
9 #include "wtf/Allocator.h" 10 #include "wtf/Allocator.h"
10 #include "wtf/PtrUtil.h" 11 #include "wtf/PtrUtil.h"
11 #include <memory>
12 12
13 namespace blink { 13 namespace blink {
14 14
15 // DataPersistent<T> provides the copy-on-modify behavior of DataRef<>, 15 // DataPersistent<T> provides the copy-on-modify behavior of DataRef<>,
16 // but for Persistent<> heap references. 16 // but for Persistent<> heap references.
17 // 17 //
18 // That is, the DataPersistent<T> copy assignment, |a = b;|, makes |a| 18 // That is, the DataPersistent<T> copy assignment, |a = b;|, makes |a|
19 // share a reference to the T object that |b| holds until |a| is mutated 19 // share a reference to the T object that |b| holds until |a| is mutated
20 // and access() on it is called. Or, dually, if |b| is mutated after the 20 // and access() on it is called. Or, dually, if |b| is mutated after the
21 // assignment that mutation isn't observable to |a| but will be performed 21 // assignment that mutation isn't observable to |a| but will be performed
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 private: 80 private:
81 // Reduce size of DataPersistent<> by delaying creation of Persistent<>. 81 // Reduce size of DataPersistent<> by delaying creation of Persistent<>.
82 std::unique_ptr<Persistent<T>> m_data; 82 std::unique_ptr<Persistent<T>> m_data;
83 unsigned m_ownCopy : 1; 83 unsigned m_ownCopy : 1;
84 }; 84 };
85 85
86 } // namespace blink 86 } // namespace blink
87 87
88 #endif // DataPersistent_h 88 #endif // DataPersistent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/DataEquivalency.h ('k') | third_party/WebKit/Source/core/style/GridArea.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698