| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // | 177 // |
| 178 // This is not needed for caches over non-Oilpan objects, as they're | 178 // This is not needed for caches over non-Oilpan objects, as they're |
| 179 // not scanned by LSan due to being held in non-global storage | 179 // not scanned by LSan due to being held in non-global storage |
| 180 // ("static" references inside functions/methods.) | 180 // ("static" references inside functions/methods.) |
| 181 if (ThreadState* threadState = ThreadState::current()) { | 181 if (ThreadState* threadState = ThreadState::current()) { |
| 182 threadState->releaseStaticPersistentNodes(); | 182 threadState->releaseStaticPersistentNodes(); |
| 183 Heap::collectAllGarbage(); | 183 Heap::collectAllGarbage(); |
| 184 } | 184 } |
| 185 #endif | 185 #endif |
| 186 | 186 |
| 187 ThreadState::current()->cleanupMainThread(); |
| 188 |
| 187 // currentThread() is null if we are running on a thread without a message l
oop. | 189 // currentThread() is null if we are running on a thread without a message l
oop. |
| 188 if (Platform::current()->currentThread()) { | 190 if (Platform::current()->currentThread()) { |
| 189 Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProv
ider::instance()); | 191 Platform::current()->unregisterMemoryDumpProvider(WebCacheMemoryDumpProv
ider::instance()); |
| 190 Platform::current()->unregisterMemoryDumpProvider(FontCacheMemoryDumpPro
vider::instance()); | 192 Platform::current()->unregisterMemoryDumpProvider(FontCacheMemoryDumpPro
vider::instance()); |
| 191 | 193 |
| 192 // We don't need to (cannot) remove s_endOfTaskRunner from the current | 194 // We don't need to (cannot) remove s_endOfTaskRunner from the current |
| 193 // message loop, because the message loop is already destructed before | 195 // message loop, because the message loop is already destructed before |
| 194 // the shutdown() is called. | 196 // the shutdown() is called. |
| 195 delete s_endOfTaskRunner; | 197 delete s_endOfTaskRunner; |
| 196 s_endOfTaskRunner = nullptr; | 198 s_endOfTaskRunner = nullptr; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 ASSERT(!reloadPages); | 280 ASSERT(!reloadPages); |
| 279 Page::refreshPlugins(); | 281 Page::refreshPlugins(); |
| 280 } | 282 } |
| 281 | 283 |
| 282 void decommitFreeableMemory() | 284 void decommitFreeableMemory() |
| 283 { | 285 { |
| 284 WTF::Partitions::decommitFreeableMemory(); | 286 WTF::Partitions::decommitFreeableMemory(); |
| 285 } | 287 } |
| 286 | 288 |
| 287 } // namespace blink | 289 } // namespace blink |
| OLD | NEW |