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

Side by Side Diff: Source/wtf/StackBounds.h

Issue 13901012: Remove OS(WINCE) as blink and chromium does not support WinCe. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2013 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2010, 2013 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 void* recursionLimit(size_t minAvailableDelta = s_defaultAvailabilityDelta) const 89 void* recursionLimit(size_t minAvailableDelta = s_defaultAvailabilityDelta) const
90 { 90 {
91 checkConsistency(); 91 checkConsistency();
92 if (isGrowingDownward()) 92 if (isGrowingDownward())
93 return static_cast<char*>(m_bound) + minAvailableDelta; 93 return static_cast<char*>(m_bound) + minAvailableDelta;
94 return static_cast<char*>(m_bound) - minAvailableDelta; 94 return static_cast<char*>(m_bound) - minAvailableDelta;
95 } 95 }
96 96
97 bool isGrowingDownward() const 97 bool isGrowingDownward() const
jamesr 2013/04/20 01:37:01 this function could also be simplified (to nothing
98 { 98 {
99 ASSERT(m_origin && m_bound); 99 ASSERT(m_origin && m_bound);
100 #if OS(WINCE)
101 return m_origin > m_bound;
102 #else
103 return true; 100 return true;
104 #endif
105 } 101 }
106 102
107 void checkConsistency() const 103 void checkConsistency() const
108 { 104 {
109 #if !ASSERT_DISABLED 105 #if !ASSERT_DISABLED
110 void* currentPosition = &currentPosition; 106 void* currentPosition = &currentPosition;
111 ASSERT(m_origin != m_bound); 107 ASSERT(m_origin != m_bound);
112 ASSERT(isGrowingDownward() 108 ASSERT(isGrowingDownward()
113 ? (currentPosition < m_origin && currentPosition > m_bound) 109 ? (currentPosition < m_origin && currentPosition > m_bound)
114 : (currentPosition > m_origin && currentPosition < m_bound)); 110 : (currentPosition > m_origin && currentPosition < m_bound));
115 #endif 111 #endif
116 } 112 }
117 113
118 void* m_origin; 114 void* m_origin;
119 void* m_bound; 115 void* m_bound;
120 116
121 friend class StackStats; 117 friend class StackStats;
122 }; 118 };
123 119
124 } // namespace WTF 120 } // namespace WTF
125 121
126 using WTF::StackBounds; 122 using WTF::StackBounds;
127 123
128 #endif 124 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698