| 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 | 364 |
| 365 virtual void registerWeakTable(const void*, EphemeronCallback, EphemeronCall
back) = 0; | 365 virtual void registerWeakTable(const void*, EphemeronCallback, EphemeronCall
back) = 0; |
| 366 #if ENABLE(ASSERT) | 366 #if ENABLE(ASSERT) |
| 367 virtual bool weakTableRegistered(const void*) = 0; | 367 virtual bool weakTableRegistered(const void*) = 0; |
| 368 #endif | 368 #endif |
| 369 | 369 |
| 370 virtual bool ensureMarked(const void*) = 0; | 370 virtual bool ensureMarked(const void*) = 0; |
| 371 | 371 |
| 372 inline MarkingMode getMarkingMode() const { return m_markingMode; } | 372 inline MarkingMode getMarkingMode() const { return m_markingMode; } |
| 373 | 373 |
| 374 ThreadHeap& heap() { return m_state->heap(); } |
| 375 |
| 374 protected: | 376 protected: |
| 375 Visitor(ThreadState*, MarkingMode); | 377 Visitor(ThreadState*, MarkingMode); |
| 376 | 378 |
| 377 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; | 379 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; |
| 378 | 380 |
| 379 private: | 381 private: |
| 380 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } | 382 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { return static_c
ast<Visitor*>(helper); } |
| 381 | 383 |
| 382 ThreadState* m_state; | 384 ThreadState* m_state; |
| 383 const MarkingMode m_markingMode; | 385 const MarkingMode m_markingMode; |
| 384 }; | 386 }; |
| 385 | 387 |
| 386 } // namespace blink | 388 } // namespace blink |
| 387 | 389 |
| 388 #endif // Visitor_h | 390 #endif // Visitor_h |
| OLD | NEW |