OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 Object** prev_next, | 128 Object** prev_next, |
129 Object** prev_limit) { | 129 Object** prev_limit) { |
130 v8::ImplementationUtilities::HandleScopeData* current = | 130 v8::ImplementationUtilities::HandleScopeData* current = |
131 isolate->handle_scope_data(); | 131 isolate->handle_scope_data(); |
132 | 132 |
133 std::swap(current->next, prev_next); | 133 std::swap(current->next, prev_next); |
134 current->level--; | 134 current->level--; |
135 if (current->limit != prev_limit) { | 135 if (current->limit != prev_limit) { |
136 current->limit = prev_limit; | 136 current->limit = prev_limit; |
137 DeleteExtensions(isolate); | 137 DeleteExtensions(isolate); |
138 #ifdef ENABLE_EXTRA_CHECKS | 138 #ifdef ENABLE_HANDLE_ZAPPING |
139 ZapRange(current->next, prev_limit); | 139 ZapRange(current->next, prev_limit); |
140 } else { | 140 } else { |
141 ZapRange(current->next, prev_next); | 141 ZapRange(current->next, prev_next); |
142 #endif | 142 #endif |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 | 146 |
147 template <typename T> | 147 template <typename T> |
148 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) { | 148 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 current->level = level_; | 207 current->level = level_; |
208 ASSERT_EQ(current->next, current->limit); | 208 ASSERT_EQ(current->next, current->limit); |
209 current->limit = limit_; | 209 current->limit = limit_; |
210 } | 210 } |
211 | 211 |
212 #endif | 212 #endif |
213 | 213 |
214 } } // namespace v8::internal | 214 } } // namespace v8::internal |
215 | 215 |
216 #endif // V8_HANDLES_INL_H_ | 216 #endif // V8_HANDLES_INL_H_ |
OLD | NEW |