| 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_GLOBAL_HANDLES_H_ | 5 #ifndef V8_GLOBAL_HANDLES_H_ |
| 6 #define V8_GLOBAL_HANDLES_H_ | 6 #define V8_GLOBAL_HANDLES_H_ |
| 7 | 7 |
| 8 #include "include/v8.h" | 8 #include "include/v8.h" |
| 9 #include "include/v8-profiler.h" | 9 #include "include/v8-profiler.h" |
| 10 | 10 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 int PostMarkSweepProcessing(int initial_post_gc_processing_count); | 297 int PostMarkSweepProcessing(int initial_post_gc_processing_count); |
| 298 int DispatchPendingPhantomCallbacks(bool synchronous_second_pass); | 298 int DispatchPendingPhantomCallbacks(bool synchronous_second_pass); |
| 299 void UpdateListOfNewSpaceNodes(); | 299 void UpdateListOfNewSpaceNodes(); |
| 300 | 300 |
| 301 // Internal node structures. | 301 // Internal node structures. |
| 302 class Node; | 302 class Node; |
| 303 class NodeBlock; | 303 class NodeBlock; |
| 304 class NodeIterator; | 304 class NodeIterator; |
| 305 class PendingPhantomCallbacksSecondPassTask; | 305 class PendingPhantomCallbacksSecondPassTask; |
| 306 | 306 |
| 307 void ClearPhantomCallbacksTask(PendingPhantomCallbacksSecondPassTask* task); |
| 308 |
| 307 Isolate* isolate_; | 309 Isolate* isolate_; |
| 308 | 310 |
| 309 // Field always containing the number of handles to global objects. | 311 // Field always containing the number of handles to global objects. |
| 310 int number_of_global_handles_; | 312 int number_of_global_handles_; |
| 311 | 313 |
| 312 // List of all allocated node blocks. | 314 // List of all allocated node blocks. |
| 313 NodeBlock* first_block_; | 315 NodeBlock* first_block_; |
| 314 | 316 |
| 315 // List of node blocks with used nodes. | 317 // List of node blocks with used nodes. |
| 316 NodeBlock* first_used_block_; | 318 NodeBlock* first_used_block_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 330 List<ImplicitRefGroup*> implicit_ref_groups_; | 332 List<ImplicitRefGroup*> implicit_ref_groups_; |
| 331 | 333 |
| 332 // Object groups and implicit references, temporary representation while | 334 // Object groups and implicit references, temporary representation while |
| 333 // constructing the groups. | 335 // constructing the groups. |
| 334 List<ObjectGroupConnection> object_group_connections_; | 336 List<ObjectGroupConnection> object_group_connections_; |
| 335 List<ObjectGroupRetainerInfo> retainer_infos_; | 337 List<ObjectGroupRetainerInfo> retainer_infos_; |
| 336 List<ObjectGroupConnection> implicit_ref_connections_; | 338 List<ObjectGroupConnection> implicit_ref_connections_; |
| 337 | 339 |
| 338 List<PendingPhantomCallback> pending_phantom_callbacks_; | 340 List<PendingPhantomCallback> pending_phantom_callbacks_; |
| 339 | 341 |
| 342 // Scheduled task that runs the second pass of the phantom callbacks. |
| 343 // We keep this pointer to send a notification when the heap is being torn |
| 344 // down. |
| 345 PendingPhantomCallbacksSecondPassTask* phantom_callbacks_task_; |
| 346 |
| 340 friend class Isolate; | 347 friend class Isolate; |
| 341 | 348 |
| 342 DISALLOW_COPY_AND_ASSIGN(GlobalHandles); | 349 DISALLOW_COPY_AND_ASSIGN(GlobalHandles); |
| 343 }; | 350 }; |
| 344 | 351 |
| 345 | 352 |
| 346 class GlobalHandles::PendingPhantomCallback { | 353 class GlobalHandles::PendingPhantomCallback { |
| 347 public: | 354 public: |
| 348 typedef v8::WeakCallbackInfo<void> Data; | 355 typedef v8::WeakCallbackInfo<void> Data; |
| 349 PendingPhantomCallback( | 356 PendingPhantomCallback( |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 List<int> new_space_indices_; | 441 List<int> new_space_indices_; |
| 435 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; | 442 int singleton_handles_[NUMBER_OF_SINGLETON_HANDLES]; |
| 436 | 443 |
| 437 DISALLOW_COPY_AND_ASSIGN(EternalHandles); | 444 DISALLOW_COPY_AND_ASSIGN(EternalHandles); |
| 438 }; | 445 }; |
| 439 | 446 |
| 440 | 447 |
| 441 } } // namespace v8::internal | 448 } } // namespace v8::internal |
| 442 | 449 |
| 443 #endif // V8_GLOBAL_HANDLES_H_ | 450 #endif // V8_GLOBAL_HANDLES_H_ |
| OLD | NEW |