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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 WTF::WrapUnique(new HeapDoesNotContainCache)), | 153 WTF::WrapUnique(new HeapDoesNotContainCache)), |
154 free_page_pool_(WTF::WrapUnique(new PagePool)), | 154 free_page_pool_(WTF::WrapUnique(new PagePool)), |
155 marking_stack_(CallbackStack::Create()), | 155 marking_stack_(CallbackStack::Create()), |
156 post_marking_callback_stack_(CallbackStack::Create()), | 156 post_marking_callback_stack_(CallbackStack::Create()), |
157 weak_callback_stack_(CallbackStack::Create()), | 157 weak_callback_stack_(CallbackStack::Create()), |
158 ephemeron_stack_(CallbackStack::Create()) { | 158 ephemeron_stack_(CallbackStack::Create()) { |
159 if (ThreadState::Current()->IsMainThread()) | 159 if (ThreadState::Current()->IsMainThread()) |
160 main_thread_heap_ = this; | 160 main_thread_heap_ = this; |
161 } | 161 } |
162 | 162 |
163 ThreadHeap::~ThreadHeap() { | 163 ThreadHeap::~ThreadHeap() {} |
164 } | |
165 | 164 |
166 #if DCHECK_IS_ON() | 165 #if DCHECK_IS_ON() |
167 BasePage* ThreadHeap::FindPageFromAddress(Address address) { | 166 BasePage* ThreadHeap::FindPageFromAddress(Address address) { |
168 return thread_state_->FindPageFromAddress(address); | 167 return thread_state_->FindPageFromAddress(address); |
169 } | 168 } |
170 #endif | 169 #endif |
171 | 170 |
172 Address ThreadHeap::CheckAndMarkPointer(Visitor* visitor, Address address) { | 171 Address ThreadHeap::CheckAndMarkPointer(Visitor* visitor, Address address) { |
173 DCHECK(ThreadState::Current()->IsInGC()); | 172 DCHECK(ThreadState::Current()->IsInGC()); |
174 | 173 |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 ProcessHeap::DecreaseTotalAllocatedObjectSize(stats_.AllocatedObjectSize()); | 508 ProcessHeap::DecreaseTotalAllocatedObjectSize(stats_.AllocatedObjectSize()); |
510 ProcessHeap::DecreaseTotalMarkedObjectSize(stats_.MarkedObjectSize()); | 509 ProcessHeap::DecreaseTotalMarkedObjectSize(stats_.MarkedObjectSize()); |
511 | 510 |
512 stats_.Reset(); | 511 stats_.Reset(); |
513 thread_state_->ResetHeapCounters(); | 512 thread_state_->ResetHeapCounters(); |
514 } | 513 } |
515 | 514 |
516 ThreadHeap* ThreadHeap::main_thread_heap_ = nullptr; | 515 ThreadHeap* ThreadHeap::main_thread_heap_ = nullptr; |
517 | 516 |
518 } // namespace blink | 517 } // namespace blink |
OLD | NEW |