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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 m_count++; \ | 311 m_count++; \ |
312 } \ | 312 } \ |
313 bool isMarked(const Type*) override { return false; } \ | 313 bool isMarked(const Type*) override { return false; } \ |
314 bool ensureMarked(const Type* objectPointer) override { \ | 314 bool ensureMarked(const Type* objectPointer) override { \ |
315 return ensureMarked(objectPointer); \ | 315 return ensureMarked(objectPointer); \ |
316 } | 316 } |
317 | 317 |
318 class CountingVisitor : public Visitor { | 318 class CountingVisitor : public Visitor { |
319 public: | 319 public: |
320 explicit CountingVisitor(ThreadState* state) | 320 explicit CountingVisitor(ThreadState* state) |
321 : Visitor(state, Visitor::ThreadLocalMarking), | 321 : Visitor(state, VisitorMarkingMode::ThreadLocalMarking), |
322 m_scope(&state->heap().stackFrameDepth()), | 322 m_scope(&state->heap().stackFrameDepth()), |
323 m_count(0) {} | 323 m_count(0) {} |
324 | 324 |
325 void mark(const void* object, TraceCallback) override { | 325 void mark(const void* object, TraceCallback) override { |
326 if (object) | 326 if (object) |
327 m_count++; | 327 m_count++; |
328 } | 328 } |
329 | 329 |
330 void markHeader(HeapObjectHeader* header, TraceCallback callback) override { | 330 void markHeader(HeapObjectHeader* header, TraceCallback callback) override { |
331 ASSERT(header->payload()); | 331 ASSERT(header->payload()); |
(...skipping 6235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6567 "HeapVector"); | 6567 "HeapVector"); |
6568 static_assert( | 6568 static_assert( |
6569 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, | 6569 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, |
6570 "HeapDeque"); | 6570 "HeapDeque"); |
6571 static_assert(WTF::IsGarbageCollectedType< | 6571 static_assert(WTF::IsGarbageCollectedType< |
6572 HeapTerminatedArray<Member<IntWrapper>>>::value, | 6572 HeapTerminatedArray<Member<IntWrapper>>>::value, |
6573 "HeapTerminatedArray"); | 6573 "HeapTerminatedArray"); |
6574 } | 6574 } |
6575 | 6575 |
6576 } // namespace blink | 6576 } // namespace blink |
OLD | NEW |