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

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

Issue 11362158: Reshuffle an if() condition to not depend on an uninitialized value. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698