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

Side by Side Diff: Source/bindings/core/v8/V8GCController.cpp

Issue 667403002: Rename nodes/elements traversal function names. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename to startsAt (and startsAfter) Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 } 169 }
170 } 170 }
171 171
172 private: 172 private:
173 bool traverseTree(Node* rootNode, WillBeHeapVector<RawPtrWillBeMember<Node>, initialNodeVectorSize>* partiallyDependentNodes) 173 bool traverseTree(Node* rootNode, WillBeHeapVector<RawPtrWillBeMember<Node>, initialNodeVectorSize>* partiallyDependentNodes)
174 { 174 {
175 // To make each minor GC time bounded, we might need to give up 175 // To make each minor GC time bounded, we might need to give up
176 // traversing at some point for a large DOM tree. That being said, 176 // traversing at some point for a large DOM tree. That being said,
177 // I could not observe the need even in pathological test cases. 177 // I could not observe the need even in pathological test cases.
178 for (Node& node : NodeTraversal::from(rootNode)) { 178 for (Node& node : NodeTraversal::startsAt(rootNode)) {
179 if (node.containsWrapper()) { 179 if (node.containsWrapper()) {
180 if (!node.isV8CollectableDuringMinorGC()) { 180 if (!node.isV8CollectableDuringMinorGC()) {
181 // This node is not in the new space of V8. This indicates t hat 181 // This node is not in the new space of V8. This indicates t hat
182 // the minor GC cannot anyway judge reachability of this DOM tree. 182 // the minor GC cannot anyway judge reachability of this DOM tree.
183 // Thus we give up traversing the DOM tree. 183 // Thus we give up traversing the DOM tree.
184 return false; 184 return false;
185 } 185 }
186 node.clearV8CollectableDuringMinorGC(); 186 node.clearV8CollectableDuringMinorGC();
187 partiallyDependentNodes->append(&node); 187 partiallyDependentNodes->append(&node);
188 } 188 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 Visitor* m_visitor; 495 Visitor* m_visitor;
496 }; 496 };
497 497
498 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor) 498 void V8GCController::traceDOMWrappers(v8::Isolate* isolate, Visitor* visitor)
499 { 499 {
500 DOMWrapperTracer tracer(visitor); 500 DOMWrapperTracer tracer(visitor);
501 v8::V8::VisitHandlesWithClassIds(isolate, &tracer); 501 v8::V8::VisitHandlesWithClassIds(isolate, &tracer);
502 } 502 }
503 503
504 } // namespace blink 504 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/core/css/resolver/SharedStyleFinder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698