Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 2642933005: Have VisitorHelper<> handle moving object registration. (Closed)
Patch Set: msvc compile fix Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/MarkingVisitor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 #endif 342 #endif
343 void registerWeakCellWithCallback(void**, WeakCallback) override {} 343 void registerWeakCellWithCallback(void**, WeakCallback) override {}
344 bool ensureMarked(const void* objectPointer) override { 344 bool ensureMarked(const void* objectPointer) override {
345 if (!objectPointer || 345 if (!objectPointer ||
346 HeapObjectHeader::fromPayload(objectPointer)->isMarked()) 346 HeapObjectHeader::fromPayload(objectPointer)->isMarked())
347 return false; 347 return false;
348 markNoTracing(objectPointer); 348 markNoTracing(objectPointer);
349 return true; 349 return true;
350 } 350 }
351 351
352 void registerMovingObjectReference(MovableReference*) override {}
353
354 void registerMovingObjectCallback(MovableReference,
355 MovingObjectCallback,
356 void*) override {}
357
358 size_t count() { return m_count; } 352 size_t count() { return m_count; }
359 void reset() { m_count = 0; } 353 void reset() { m_count = 0; }
360 354
361 private: 355 private:
362 StackFrameDepthScope m_scope; 356 StackFrameDepthScope m_scope;
363 size_t m_count; 357 size_t m_count;
364 }; 358 };
365 359
366 #undef DEFINE_VISITOR_METHODS 360 #undef DEFINE_VISITOR_METHODS
367 361
(...skipping 6199 matching lines...) Expand 10 before | Expand all | Expand 10 after
6567 "HeapVector"); 6561 "HeapVector");
6568 static_assert( 6562 static_assert(
6569 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6563 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6570 "HeapDeque"); 6564 "HeapDeque");
6571 static_assert(WTF::IsGarbageCollectedType< 6565 static_assert(WTF::IsGarbageCollectedType<
6572 HeapTerminatedArray<Member<IntWrapper>>>::value, 6566 HeapTerminatedArray<Member<IntWrapper>>>::value,
6573 "HeapTerminatedArray"); 6567 "HeapTerminatedArray");
6574 } 6568 }
6575 6569
6576 } // namespace blink 6570 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/heap/MarkingVisitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698