Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: src/global-handles.cc

Issue 11969037: Remove unused GlobalHandles::IterateWeakRoots() (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/global-handles.h ('K') | « src/global-handles.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 return Node::FromLocation(location)->wrapper_class_id(); 516 return Node::FromLocation(location)->wrapper_class_id();
517 } 517 }
518 518
519 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) { 519 void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) {
520 for (NodeIterator it(this); !it.done(); it.Advance()) { 520 for (NodeIterator it(this); !it.done(); it.Advance()) {
521 if (it.node()->IsWeakRetainer()) v->VisitPointer(it.node()->location()); 521 if (it.node()->IsWeakRetainer()) v->VisitPointer(it.node()->location());
522 } 522 }
523 } 523 }
524 524
525 525
526 void GlobalHandles::IterateWeakRoots(WeakReferenceGuest f,
527 WeakReferenceCallback callback) {
528 for (NodeIterator it(this); !it.done(); it.Advance()) {
529 if (it.node()->IsWeak() && it.node()->callback() == callback) {
530 f(it.node()->object(), it.node()->parameter());
531 }
532 }
533 }
534
535
536 void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) { 526 void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) {
537 for (NodeIterator it(this); !it.done(); it.Advance()) { 527 for (NodeIterator it(this); !it.done(); it.Advance()) {
538 if (it.node()->IsWeak() && f(it.node()->location())) { 528 if (it.node()->IsWeak() && f(it.node()->location())) {
539 it.node()->MarkPending(); 529 it.node()->MarkPending();
540 } 530 }
541 } 531 }
542 } 532 }
543 533
544 534
545 void GlobalHandles::IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v) { 535 void GlobalHandles::IterateNewSpaceStrongAndDependentRoots(ObjectVisitor* v) {
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 implicit_ref_groups_.Clear(); 816 implicit_ref_groups_.Clear();
827 } 817 }
828 818
829 819
830 void GlobalHandles::TearDown() { 820 void GlobalHandles::TearDown() {
831 // TODO(1428): invoke weak callbacks. 821 // TODO(1428): invoke weak callbacks.
832 } 822 }
833 823
834 824
835 } } // namespace v8::internal 825 } } // namespace v8::internal
OLDNEW
« src/global-handles.h ('K') | « src/global-handles.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698