| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2013 Google Inc. All rights reserved. | 2  * Copyright (C) 2013 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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 321 // | 321 // | 
| 322 // Pointers within objects are traced by calling the |trace| methods | 322 // Pointers within objects are traced by calling the |trace| methods | 
| 323 // with the object as an argument. Tracing objects will mark all of the | 323 // with the object as an argument. Tracing objects will mark all of the | 
| 324 // contained pointers and push them on the marking stack. | 324 // contained pointers and push them on the marking stack. | 
| 325 class PLATFORM_EXPORT Visitor : public VisitorHelper<Visitor> { | 325 class PLATFORM_EXPORT Visitor : public VisitorHelper<Visitor> { | 
| 326 public: | 326 public: | 
| 327     friend class VisitorHelper<Visitor>; | 327     friend class VisitorHelper<Visitor>; | 
| 328     friend class InlinedGlobalMarkingVisitor; | 328     friend class InlinedGlobalMarkingVisitor; | 
| 329 | 329 | 
| 330     enum MarkingMode { | 330     enum MarkingMode { | 
|  | 331         // This is a default visitor. This is used for GCType=GCWithSweep | 
|  | 332         // and GCType=GCWithoutSweep. | 
| 331         GlobalMarking, | 333         GlobalMarking, | 
|  | 334         // This visitor does not trace objects outside the heap of the | 
|  | 335         // GCing thread. This is used for GCType=ThreadTerminationGC. | 
| 332         ThreadLocalMarking, | 336         ThreadLocalMarking, | 
|  | 337         // This visitor just marks objects and ignores weak processing. | 
|  | 338         // This is used for GCType=TakeSnapshot. | 
|  | 339         SnapshotMarking, | 
|  | 340         // This visitor is used to trace objects during weak processing. | 
|  | 341         // This visitor is allowed to trace only already marked objects. | 
| 333         WeakProcessing, | 342         WeakProcessing, | 
| 334     }; | 343     }; | 
| 335 | 344 | 
| 336     virtual ~Visitor() { } | 345     virtual ~Visitor() { } | 
| 337 | 346 | 
| 338     using VisitorHelper<Visitor>::mark; | 347     using VisitorHelper<Visitor>::mark; | 
| 339 | 348 | 
| 340     // This method marks an object and adds it to the set of objects | 349     // This method marks an object and adds it to the set of objects | 
| 341     // that should have their trace method called. Since not all | 350     // that should have their trace method called. Since not all | 
| 342     // objects have vtables we have to have the callback as an | 351     // objects have vtables we have to have the callback as an | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 422     { | 431     { | 
| 423         DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
     ctionName(WTF::extractNameFunction<T>()))); | 432         DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
     ctionName(WTF::extractNameFunction<T>()))); | 
| 424         return typenameString; | 433         return typenameString; | 
| 425     } | 434     } | 
| 426 }; | 435 }; | 
| 427 #endif | 436 #endif | 
| 428 | 437 | 
| 429 } // namespace blink | 438 } // namespace blink | 
| 430 | 439 | 
| 431 #endif // Visitor_h | 440 #endif // Visitor_h | 
| OLD | NEW | 
|---|