| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 { \ | 232 { \ |
| 233 return ensureMarked(objectPointer); \ | 233 return ensureMarked(objectPointer); \ |
| 234 } | 234 } |
| 235 | 235 |
| 236 class CountingVisitor : public Visitor { | 236 class CountingVisitor : public Visitor { |
| 237 public: | 237 public: |
| 238 CountingVisitor() | 238 CountingVisitor() |
| 239 : Visitor(Visitor::GenericVisitorType) | 239 : Visitor(Visitor::GenericVisitorType) |
| 240 , m_count(0) | 240 , m_count(0) |
| 241 { | 241 { |
| 242 configureEagerTraceLimit(); | |
| 243 } | 242 } |
| 244 | 243 |
| 245 virtual void mark(const void* object, TraceCallback) override | 244 virtual void mark(const void* object, TraceCallback) override |
| 246 { | 245 { |
| 247 if (object) | 246 if (object) |
| 248 m_count++; | 247 m_count++; |
| 249 } | 248 } |
| 250 | 249 |
| 251 virtual void markHeader(HeapObjectHeader* header, TraceCallback callback) ov
erride | 250 virtual void markHeader(HeapObjectHeader* header, TraceCallback callback) ov
erride |
| 252 { | 251 { |
| (...skipping 5234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5487 // re-adjusting both start&end indices in terms of that expanded buffer. | 5486 // re-adjusting both start&end indices in terms of that expanded buffer. |
| 5488 EXPECT_EQ(80u, deque->size()); | 5487 EXPECT_EQ(80u, deque->size()); |
| 5489 i = 0; | 5488 i = 0; |
| 5490 for (const auto& intWrapper : *deque) { | 5489 for (const auto& intWrapper : *deque) { |
| 5491 EXPECT_EQ(i + 50, intWrapper->value()); | 5490 EXPECT_EQ(i + 50, intWrapper->value()); |
| 5492 i++; | 5491 i++; |
| 5493 } | 5492 } |
| 5494 } | 5493 } |
| 5495 | 5494 |
| 5496 } // namespace blink | 5495 } // namespace blink |
| OLD | NEW |