| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 100 |
| 101 void HandleScope::CloseScope() { | 101 void HandleScope::CloseScope() { |
| 102 v8::ImplementationUtilities::HandleScopeData* current = | 102 v8::ImplementationUtilities::HandleScopeData* current = |
| 103 isolate_->handle_scope_data(); | 103 isolate_->handle_scope_data(); |
| 104 current->next = prev_next_; | 104 current->next = prev_next_; |
| 105 current->level--; | 105 current->level--; |
| 106 if (current->limit != prev_limit_) { | 106 if (current->limit != prev_limit_) { |
| 107 current->limit = prev_limit_; | 107 current->limit = prev_limit_; |
| 108 DeleteExtensions(isolate_); | 108 DeleteExtensions(isolate_); |
| 109 } | 109 } |
| 110 #ifdef DEBUG | 110 #ifdef ENABLE_EXTRA_CHECKS |
| 111 ZapRange(prev_next_, prev_limit_); | 111 ZapRange(prev_next_, prev_limit_); |
| 112 #endif | 112 #endif |
| 113 } | 113 } |
| 114 | 114 |
| 115 | 115 |
| 116 template <typename T> | 116 template <typename T> |
| 117 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) { | 117 Handle<T> HandleScope::CloseAndEscape(Handle<T> handle_value) { |
| 118 T* value = *handle_value; | 118 T* value = *handle_value; |
| 119 // Throw away all handles in the current scope. | 119 // Throw away all handles in the current scope. |
| 120 CloseScope(); | 120 CloseScope(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 | 189 |
| 190 HandleDereferenceGuard::~HandleDereferenceGuard() { | 190 HandleDereferenceGuard::~HandleDereferenceGuard() { |
| 191 isolate_->SetAllowHandleDereference(old_state_); | 191 isolate_->SetAllowHandleDereference(old_state_); |
| 192 } | 192 } |
| 193 | 193 |
| 194 #endif | 194 #endif |
| 195 | 195 |
| 196 } } // namespace v8::internal | 196 } } // namespace v8::internal |
| 197 | 197 |
| 198 #endif // V8_HANDLES_INL_H_ | 198 #endif // V8_HANDLES_INL_H_ |
| OLD | NEW |