| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 virtual void registerWeakMembers(const void*, const void*, WeakCallback) = 0
; | 387 virtual void registerWeakMembers(const void*, const void*, WeakCallback) = 0
; |
| 388 using VisitorHelper<Visitor>::registerWeakMembers; | 388 using VisitorHelper<Visitor>::registerWeakMembers; |
| 389 | 389 |
| 390 virtual void registerWeakTable(const void*, EphemeronCallback, EphemeronCall
back) = 0; | 390 virtual void registerWeakTable(const void*, EphemeronCallback, EphemeronCall
back) = 0; |
| 391 #if ENABLE(ASSERT) | 391 #if ENABLE(ASSERT) |
| 392 virtual bool weakTableRegistered(const void*) = 0; | 392 virtual bool weakTableRegistered(const void*) = 0; |
| 393 #endif | 393 #endif |
| 394 | 394 |
| 395 virtual bool ensureMarked(const void*) = 0; | 395 virtual bool ensureMarked(const void*) = 0; |
| 396 | 396 |
| 397 #if ENABLE(GC_PROFILING) | |
| 398 void setHostInfo(void* object, const String& name) | |
| 399 { | |
| 400 m_hostObject = object; | |
| 401 m_hostName = name; | |
| 402 } | |
| 403 #endif | |
| 404 | |
| 405 inline MarkingMode markingMode() const { return m_markingMode; } | 397 inline MarkingMode markingMode() const { return m_markingMode; } |
| 406 | 398 |
| 407 protected: | 399 protected: |
| 408 explicit Visitor(MarkingMode markingMode) | 400 explicit Visitor(MarkingMode markingMode) |
| 409 : m_markingMode(markingMode) | 401 : m_markingMode(markingMode) |
| 410 { } | 402 { } |
| 411 | 403 |
| 412 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; | 404 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; |
| 413 #if ENABLE(GC_PROFILING) | |
| 414 virtual void recordObjectGraphEdge(const void*) = 0; | |
| 415 | |
| 416 void* m_hostObject; | |
| 417 String m_hostName; | |
| 418 #endif | |
| 419 | 405 |
| 420 private: | 406 private: |
| 421 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } | 407 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } |
| 422 | 408 |
| 423 const MarkingMode m_markingMode; | 409 const MarkingMode m_markingMode; |
| 424 bool m_isGlobalMarkingVisitor; | 410 bool m_isGlobalMarkingVisitor; |
| 425 }; | 411 }; |
| 426 | 412 |
| 427 #if ENABLE(GC_PROFILING) | 413 #if ENABLE(GC_PROFILING) |
| 428 template<typename T> | 414 template<typename T> |
| 429 struct TypenameStringTrait { | 415 struct TypenameStringTrait { |
| 430 static const String& get() | 416 static const String& get() |
| 431 { | 417 { |
| 432 DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
ctionName(WTF::extractNameFunction<T>()))); | 418 DEFINE_STATIC_LOCAL(String, typenameString, (WTF::extractTypeNameFromFun
ctionName(WTF::extractNameFunction<T>()))); |
| 433 return typenameString; | 419 return typenameString; |
| 434 } | 420 } |
| 435 }; | 421 }; |
| 436 #endif | 422 #endif |
| 437 | 423 |
| 438 } // namespace blink | 424 } // namespace blink |
| 439 | 425 |
| 440 #endif // Visitor_h | 426 #endif // Visitor_h |
| OLD | NEW |