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

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

Issue 1379603006: [Oilpan] Refactoring: Rename GarbageCollectedBase to GarbageCollectedType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/platform/heap/GCInfo.h ('k') | no next file » | 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 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 protected: 349 protected:
350 void operator delete[](void* p) 350 void operator delete[](void* p)
351 { 351 {
352 ASSERT_NOT_REACHED(); 352 ASSERT_NOT_REACHED();
353 } 353 }
354 #else 354 #else
355 void operator delete[](void* p); 355 void operator delete[](void* p);
356 #endif 356 #endif
357 357
358 public: 358 public:
359 using GarbageCollectedBase = T; 359 using GarbageCollectedType = T;
360 360
361 void* operator new(size_t size) 361 void* operator new(size_t size)
362 { 362 {
363 return allocateObject(size, IsEagerlyFinalizedType<T>::value); 363 return allocateObject(size, IsEagerlyFinalizedType<T>::value);
364 } 364 }
365 365
366 static void* allocateObject(size_t size, bool eagerlySweep) 366 static void* allocateObject(size_t size, bool eagerlySweep)
367 { 367 {
368 return Heap::allocate<T>(size, eagerlySweep); 368 return Heap::allocate<T>(size, eagerlySweep);
369 } 369 }
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) 508 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object)
509 { 509 {
510 T** cell = reinterpret_cast<T**>(object); 510 T** cell = reinterpret_cast<T**>(object);
511 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) 511 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell))
512 *cell = nullptr; 512 *cell = nullptr;
513 } 513 }
514 514
515 } // namespace blink 515 } // namespace blink
516 516
517 #endif // Heap_h 517 #endif // Heap_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GCInfo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698