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

Side by Side Diff: third_party/WebKit/Source/platform/heap/Visitor.h

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: 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
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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 // if objects pointed to are alive it is crucial that the object 372 // if objects pointed to are alive it is crucial that the object
373 // pointed to belong to the same thread as the object receiving 373 // pointed to belong to the same thread as the object receiving
374 // the weak callback. Since other threads have been resumed the 374 // the weak callback. Since other threads have been resumed the
375 // mark bits are not valid for objects from other threads. 375 // mark bits are not valid for objects from other threads.
376 virtual void registerWeakMembers(const void*, const void*, WeakCallback) = 0; 376 virtual void registerWeakMembers(const void*, const void*, WeakCallback) = 0;
377 using VisitorHelper<Visitor>::registerWeakMembers; 377 using VisitorHelper<Visitor>::registerWeakMembers;
378 378
379 virtual void registerWeakTable(const void*, 379 virtual void registerWeakTable(const void*,
380 EphemeronCallback, 380 EphemeronCallback,
381 EphemeronCallback) = 0; 381 EphemeronCallback) = 0;
382 #if ENABLE(ASSERT) 382 #if DCHECK_IS_ON()
383 virtual bool weakTableRegistered(const void*) = 0; 383 virtual bool weakTableRegistered(const void*) = 0;
384 #endif 384 #endif
385 385
386 virtual bool ensureMarked(const void*) = 0; 386 virtual bool ensureMarked(const void*) = 0;
387 387
388 virtual void registerMovingObjectReference(MovableReference*) = 0; 388 virtual void registerMovingObjectReference(MovableReference*) = 0;
389 389
390 virtual void registerMovingObjectCallback(MovableReference, 390 virtual void registerMovingObjectCallback(MovableReference,
391 MovingObjectCallback, 391 MovingObjectCallback,
392 void*) = 0; 392 void*) = 0;
393 393
394 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0; 394 virtual void registerWeakCellWithCallback(void**, WeakCallback) = 0;
395 395
396 protected: 396 protected:
397 Visitor(ThreadState*, VisitorMarkingMode); 397 Visitor(ThreadState*, VisitorMarkingMode);
398 398
399 private: 399 private:
400 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) { 400 static Visitor* fromHelper(VisitorHelper<Visitor>* helper) {
401 return static_cast<Visitor*>(helper); 401 return static_cast<Visitor*>(helper);
402 } 402 }
403 }; 403 };
404 404
405 } // namespace blink 405 } // namespace blink
406 406
407 #endif // Visitor_h 407 #endif // Visitor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698