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

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

Issue 2466383004: blink: Cleanup class forward declarations (Closed)
Patch Set: Created 4 years, 1 month 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 29 matching lines...) Expand all
40 #include "platform/heap/Visitor.h" 40 #include "platform/heap/Visitor.h"
41 #include "wtf/AddressSanitizer.h" 41 #include "wtf/AddressSanitizer.h"
42 #include "wtf/Allocator.h" 42 #include "wtf/Allocator.h"
43 #include "wtf/Assertions.h" 43 #include "wtf/Assertions.h"
44 #include "wtf/Atomics.h" 44 #include "wtf/Atomics.h"
45 #include "wtf/Forward.h" 45 #include "wtf/Forward.h"
46 #include <memory> 46 #include <memory>
47 47
48 namespace blink { 48 namespace blink {
49 49
50 class FreePagePool;
51 class OrphanedPagePool;
52
50 class PLATFORM_EXPORT HeapAllocHooks { 53 class PLATFORM_EXPORT HeapAllocHooks {
51 public: 54 public:
52 // TODO(hajimehoshi): Pass a type name of the allocated object. 55 // TODO(hajimehoshi): Pass a type name of the allocated object.
53 typedef void AllocationHook(Address, size_t, const char*); 56 typedef void AllocationHook(Address, size_t, const char*);
54 typedef void FreeHook(Address); 57 typedef void FreeHook(Address);
55 58
56 static void setAllocationHook(AllocationHook* hook) { 59 static void setAllocationHook(AllocationHook* hook) {
57 m_allocationHook = hook; 60 m_allocationHook = hook;
58 } 61 }
59 static void setFreeHook(FreeHook* hook) { m_freeHook = hook; } 62 static void setFreeHook(FreeHook* hook) { m_freeHook = hook; }
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 template <typename T> 676 template <typename T>
674 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) { 677 void VisitorHelper<Derived>::handleWeakCell(Visitor* self, void* object) {
675 T** cell = reinterpret_cast<T**>(object); 678 T** cell = reinterpret_cast<T**>(object);
676 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell)) 679 if (*cell && !ObjectAliveTrait<T>::isHeapObjectAlive(*cell))
677 *cell = nullptr; 680 *cell = nullptr;
678 } 681 }
679 682
680 } // namespace blink 683 } // namespace blink
681 684
682 #endif // Heap_h 685 #endif // Heap_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698