OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 }; | 71 }; |
72 | 72 |
73 PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&); | 73 PLATFORM_EXPORT bool operator==(const FontFamily&, const FontFamily&); |
74 inline bool operator!=(const FontFamily& a, const FontFamily& b) { | 74 inline bool operator!=(const FontFamily& a, const FontFamily& b) { |
75 return !(a == b); | 75 return !(a == b); |
76 } | 76 } |
77 | 77 |
78 inline FontFamily::~FontFamily() { | 78 inline FontFamily::~FontFamily() { |
79 RefPtr<SharedFontFamily> reaper = m_next.release(); | 79 RefPtr<SharedFontFamily> reaper = m_next.release(); |
80 while (reaper && reaper->hasOneRef()) | 80 while (reaper && reaper->hasOneRef()) |
81 reaper = | 81 reaper = reaper->releaseNext(); // implicitly protects reaper->next, then |
dcheng
2016/10/03 20:41:17
Nit: I find this more readable on its own line (al
Nico
2016/10/03 20:46:56
Done.
| |
82 reaper | 82 // derefs reaper |
83 ->releaseNext(); // implicitly protects reaper->next, then derefs r eaper | |
84 } | 83 } |
85 | 84 |
86 inline const FontFamily* FontFamily::next() const { | 85 inline const FontFamily* FontFamily::next() const { |
87 return m_next.get(); | 86 return m_next.get(); |
88 } | 87 } |
89 | 88 |
90 inline void FontFamily::appendFamily(PassRefPtr<SharedFontFamily> family) { | 89 inline void FontFamily::appendFamily(PassRefPtr<SharedFontFamily> family) { |
91 m_next = family; | 90 m_next = family; |
92 } | 91 } |
93 | 92 |
94 inline PassRefPtr<SharedFontFamily> FontFamily::releaseNext() { | 93 inline PassRefPtr<SharedFontFamily> FontFamily::releaseNext() { |
95 return m_next.release(); | 94 return m_next.release(); |
96 } | 95 } |
97 | 96 |
98 } // namespace blink | 97 } // namespace blink |
99 | 98 |
100 #endif | 99 #endif |
OLD | NEW |