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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 static void adjustAmountOfExternalAllocatedMemory(int size) | 156 static void adjustAmountOfExternalAllocatedMemory(int size) |
157 { | 157 { |
158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size); | 158 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(size); |
159 } | 159 } |
160 | 160 |
161 void initializeWithoutV8(Platform* platform) | 161 void initializeWithoutV8(Platform* platform) |
162 { | 162 { |
163 ASSERT(!s_webKitInitialized); | 163 ASSERT(!s_webKitInitialized); |
164 s_webKitInitialized = true; | 164 s_webKitInitialized = true; |
165 | 165 |
| 166 WTF::Partitions::initialize(histogramEnumerationFunction); |
166 ASSERT(platform); | 167 ASSERT(platform); |
167 Platform::initialize(platform); | 168 Platform::initialize(platform); |
168 | 169 |
169 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, hi
stogramEnumerationFunction, adjustAmountOfExternalAllocatedMemory); | 170 WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction, ad
justAmountOfExternalAllocatedMemory); |
170 WTF::initializeMainThread(callOnMainThreadFunction); | 171 WTF::initializeMainThread(callOnMainThreadFunction); |
171 Heap::init(); | 172 Heap::init(); |
172 | 173 |
173 ThreadState::attachMainThread(); | 174 ThreadState::attachMainThread(); |
174 // currentThread() is null if we are running on a thread without a message l
oop. | 175 // currentThread() is null if we are running on a thread without a message l
oop. |
175 if (WebThread* currentThread = platform->currentThread()) { | 176 if (WebThread* currentThread = platform->currentThread()) { |
176 ASSERT(!s_gcTaskRunner); | 177 ASSERT(!s_gcTaskRunner); |
177 s_gcTaskRunner = new GCTaskRunner(currentThread); | 178 s_gcTaskRunner = new GCTaskRunner(currentThread); |
178 } | 179 } |
179 | 180 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 ASSERT(!reloadPages); | 302 ASSERT(!reloadPages); |
302 Page::refreshPlugins(); | 303 Page::refreshPlugins(); |
303 } | 304 } |
304 | 305 |
305 void decommitFreeableMemory() | 306 void decommitFreeableMemory() |
306 { | 307 { |
307 WTF::Partitions::decommitFreeableMemory(); | 308 WTF::Partitions::decommitFreeableMemory(); |
308 } | 309 } |
309 | 310 |
310 } // namespace blink | 311 } // namespace blink |
OLD | NEW |