| 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 2110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2121 return set; | 2121 return set; |
| 2122 } | 2122 } |
| 2123 #endif | 2123 #endif |
| 2124 | 2124 |
| 2125 protected: | 2125 protected: |
| 2126 virtual void registerWeakCellWithCallback(void** cell, WeakPointerCallback c
allback) override | 2126 virtual void registerWeakCellWithCallback(void** cell, WeakPointerCallback c
allback) override |
| 2127 { | 2127 { |
| 2128 Impl::registerWeakCellWithCallback(cell, callback); | 2128 Impl::registerWeakCellWithCallback(cell, callback); |
| 2129 } | 2129 } |
| 2130 | 2130 |
| 2131 inline bool checkSkipForObjectInTerminatingThreadHeap(const void* objectPoin
ter) | 2131 inline bool shouldMarkObject(const void* objectPointer) |
| 2132 { | 2132 { |
| 2133 if (Mode != ThreadLocalMarking) | 2133 if (Mode != ThreadLocalMarking) |
| 2134 return false; | 2134 return true; |
| 2135 | 2135 |
| 2136 BaseHeapPage* page = pageFromObject(objectPointer); | 2136 BaseHeapPage* page = pageFromObject(objectPointer); |
| 2137 ASSERT(!page->orphaned()); | 2137 ASSERT(!page->orphaned()); |
| 2138 // When doing a thread local GC, the marker checks if | 2138 // When doing a thread local GC, the marker checks if |
| 2139 // the object resides in another thread's heap. The | 2139 // the object resides in another thread's heap. If it |
| 2140 // object should not be traced, if it does. | 2140 // does, the object should not be marked & traced. |
| 2141 return page->terminating(); | 2141 return page->terminating(); |
| 2142 } | 2142 } |
| 2143 }; | 2143 }; |
| 2144 | 2144 |
| 2145 void Heap::init() | 2145 void Heap::init() |
| 2146 { | 2146 { |
| 2147 ThreadState::init(); | 2147 ThreadState::init(); |
| 2148 s_markingStack = new CallbackStack(); | 2148 s_markingStack = new CallbackStack(); |
| 2149 s_postMarkingCallbackStack = new CallbackStack(); | 2149 s_postMarkingCallbackStack = new CallbackStack(); |
| 2150 s_weakCallbackStack = new CallbackStack(); | 2150 s_weakCallbackStack = new CallbackStack(); |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2817 bool Heap::s_shutdownCalled = false; | 2817 bool Heap::s_shutdownCalled = false; |
| 2818 bool Heap::s_lastGCWasConservative = false; | 2818 bool Heap::s_lastGCWasConservative = false; |
| 2819 FreePagePool* Heap::s_freePagePool; | 2819 FreePagePool* Heap::s_freePagePool; |
| 2820 OrphanedPagePool* Heap::s_orphanedPagePool; | 2820 OrphanedPagePool* Heap::s_orphanedPagePool; |
| 2821 Heap::RegionTree* Heap::s_regionTree = nullptr; | 2821 Heap::RegionTree* Heap::s_regionTree = nullptr; |
| 2822 size_t Heap::s_allocatedObjectSize = 0; | 2822 size_t Heap::s_allocatedObjectSize = 0; |
| 2823 size_t Heap::s_allocatedSpace = 0; | 2823 size_t Heap::s_allocatedSpace = 0; |
| 2824 size_t Heap::s_markedObjectSize = 0; | 2824 size_t Heap::s_markedObjectSize = 0; |
| 2825 | 2825 |
| 2826 } // namespace blink | 2826 } // namespace blink |
| OLD | NEW |