| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project 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 V8_HANDLES_H_ | 5 #ifndef V8_HANDLES_H_ |
| 6 #define V8_HANDLES_H_ | 6 #define V8_HANDLES_H_ |
| 7 | 7 |
| 8 #include <type_traits> | 8 #include <type_traits> |
| 9 | 9 |
| 10 #include "include/v8.h" | 10 #include "include/v8.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 RootIndexMap* root_index_map_; | 354 RootIndexMap* root_index_map_; |
| 355 IdentityMap<Object**>* identity_map_; | 355 IdentityMap<Object**>* identity_map_; |
| 356 // Ordinary nested handle scopes within the current one are not canonical. | 356 // Ordinary nested handle scopes within the current one are not canonical. |
| 357 int canonical_level_; | 357 int canonical_level_; |
| 358 // We may have nested canonical scopes. Handles are canonical within each one. | 358 // We may have nested canonical scopes. Handles are canonical within each one. |
| 359 CanonicalHandleScope* prev_canonical_scope_; | 359 CanonicalHandleScope* prev_canonical_scope_; |
| 360 | 360 |
| 361 friend class HandleScope; | 361 friend class HandleScope; |
| 362 }; | 362 }; |
| 363 | 363 |
| 364 | 364 class V8_EXPORT_PRIVATE DeferredHandleScope final { |
| 365 class DeferredHandleScope final { | |
| 366 public: | 365 public: |
| 367 explicit DeferredHandleScope(Isolate* isolate); | 366 explicit DeferredHandleScope(Isolate* isolate); |
| 368 // The DeferredHandles object returned stores the Handles created | 367 // The DeferredHandles object returned stores the Handles created |
| 369 // since the creation of this DeferredHandleScope. The Handles are | 368 // since the creation of this DeferredHandleScope. The Handles are |
| 370 // alive as long as the DeferredHandles object is alive. | 369 // alive as long as the DeferredHandles object is alive. |
| 371 DeferredHandles* Detach(); | 370 DeferredHandles* Detach(); |
| 372 ~DeferredHandleScope(); | 371 ~DeferredHandleScope(); |
| 373 | 372 |
| 374 private: | 373 private: |
| 375 Object** prev_limit_; | 374 Object** prev_limit_; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 next = limit = NULL; | 413 next = limit = NULL; |
| 415 sealed_level = level = 0; | 414 sealed_level = level = 0; |
| 416 canonical_scope = NULL; | 415 canonical_scope = NULL; |
| 417 } | 416 } |
| 418 }; | 417 }; |
| 419 | 418 |
| 420 } // namespace internal | 419 } // namespace internal |
| 421 } // namespace v8 | 420 } // namespace v8 |
| 422 | 421 |
| 423 #endif // V8_HANDLES_H_ | 422 #endif // V8_HANDLES_H_ |
| OLD | NEW |