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 class V8_EXPORT_PRIVATE DeferredHandleScope final { | 364 |
| 365 class DeferredHandleScope final { |
365 public: | 366 public: |
366 explicit DeferredHandleScope(Isolate* isolate); | 367 explicit DeferredHandleScope(Isolate* isolate); |
367 // The DeferredHandles object returned stores the Handles created | 368 // The DeferredHandles object returned stores the Handles created |
368 // since the creation of this DeferredHandleScope. The Handles are | 369 // since the creation of this DeferredHandleScope. The Handles are |
369 // alive as long as the DeferredHandles object is alive. | 370 // alive as long as the DeferredHandles object is alive. |
370 DeferredHandles* Detach(); | 371 DeferredHandles* Detach(); |
371 ~DeferredHandleScope(); | 372 ~DeferredHandleScope(); |
372 | 373 |
373 private: | 374 private: |
374 Object** prev_limit_; | 375 Object** prev_limit_; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 next = limit = NULL; | 414 next = limit = NULL; |
414 sealed_level = level = 0; | 415 sealed_level = level = 0; |
415 canonical_scope = NULL; | 416 canonical_scope = NULL; |
416 } | 417 } |
417 }; | 418 }; |
418 | 419 |
419 } // namespace internal | 420 } // namespace internal |
420 } // namespace v8 | 421 } // namespace v8 |
421 | 422 |
422 #endif // V8_HANDLES_H_ | 423 #endif // V8_HANDLES_H_ |
OLD | NEW |