OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 for (NodeIterator it(this); !it.done(); it.Advance()) { | 626 for (NodeIterator it(this); !it.done(); it.Advance()) { |
627 if (it.node()->IsRetainer()) { | 627 if (it.node()->IsRetainer()) { |
628 v->VisitPointer(it.node()->location()); | 628 v->VisitPointer(it.node()->location()); |
629 } | 629 } |
630 } | 630 } |
631 } | 631 } |
632 | 632 |
633 | 633 |
634 void GlobalHandles::IterateAllRootsWithClassIds(ObjectVisitor* v) { | 634 void GlobalHandles::IterateAllRootsWithClassIds(ObjectVisitor* v) { |
635 for (NodeIterator it(this); !it.done(); it.Advance()) { | 635 for (NodeIterator it(this); !it.done(); it.Advance()) { |
636 if (it.node()->has_wrapper_class_id() && it.node()->IsRetainer()) { | 636 if (it.node()->IsRetainer() && it.node()->has_wrapper_class_id()) { |
637 v->VisitEmbedderReference(it.node()->location(), | 637 v->VisitEmbedderReference(it.node()->location(), |
638 it.node()->wrapper_class_id()); | 638 it.node()->wrapper_class_id()); |
639 } | 639 } |
640 } | 640 } |
641 } | 641 } |
642 | 642 |
643 | 643 |
644 void GlobalHandles::RecordStats(HeapStats* stats) { | 644 void GlobalHandles::RecordStats(HeapStats* stats) { |
645 *stats->global_handle_count = 0; | 645 *stats->global_handle_count = 0; |
646 *stats->weak_global_handle_count = 0; | 646 *stats->weak_global_handle_count = 0; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
746 implicit_ref_groups_.Clear(); | 746 implicit_ref_groups_.Clear(); |
747 } | 747 } |
748 | 748 |
749 | 749 |
750 void GlobalHandles::TearDown() { | 750 void GlobalHandles::TearDown() { |
751 // TODO(1428): invoke weak callbacks. | 751 // TODO(1428): invoke weak callbacks. |
752 } | 752 } |
753 | 753 |
754 | 754 |
755 } } // namespace v8::internal | 755 } } // namespace v8::internal |
OLD | NEW |