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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 { | 315 { |
316 checkThread(); | 316 checkThread(); |
317 ASSERT(!**s_threadSpecific); | 317 ASSERT(!**s_threadSpecific); |
318 **s_threadSpecific = this; | 318 **s_threadSpecific = this; |
319 | 319 |
320 if (isMainThread()) { | 320 if (isMainThread()) { |
321 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); | 321 s_mainThreadStackStart = reinterpret_cast<uintptr_t>(m_startOfStack) - s
izeof(void*); |
322 s_mainThreadUnderestimatedStackSize = getUnderestimatedStackSize() - siz
eof(void*); | 322 s_mainThreadUnderestimatedStackSize = getUnderestimatedStackSize() - siz
eof(void*); |
323 } | 323 } |
324 | 324 |
325 for (int heapIndex = 0; heapIndex < NumberOfHeaps; heapIndex++) | 325 for (int heapIndex = 0; heapIndex < LargeObjectHeap; heapIndex++) |
326 m_heaps[heapIndex] = new ThreadHeap(this, heapIndex); | 326 m_heaps[heapIndex] = new ThreadHeapForHeapPage(this, heapIndex); |
| 327 m_heaps[LargeObjectHeap] = new ThreadHeapForLargeObject(this, LargeObjectHea
p); |
327 | 328 |
328 m_weakCallbackStack = new CallbackStack(); | 329 m_weakCallbackStack = new CallbackStack(); |
329 } | 330 } |
330 | 331 |
331 ThreadState::~ThreadState() | 332 ThreadState::~ThreadState() |
332 { | 333 { |
333 checkThread(); | 334 checkThread(); |
334 delete m_weakCallbackStack; | 335 delete m_weakCallbackStack; |
335 m_weakCallbackStack = nullptr; | 336 m_weakCallbackStack = nullptr; |
336 for (int i = 0; i < NumberOfHeaps; ++i) | 337 for (int i = 0; i < NumberOfHeaps; ++i) |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 return gcInfo; | 1165 return gcInfo; |
1165 } | 1166 } |
1166 } | 1167 } |
1167 if (needLockForIteration) | 1168 if (needLockForIteration) |
1168 threadAttachMutex().unlock(); | 1169 threadAttachMutex().unlock(); |
1169 return nullptr; | 1170 return nullptr; |
1170 } | 1171 } |
1171 #endif | 1172 #endif |
1172 | 1173 |
1173 } // namespace blink | 1174 } // namespace blink |
OLD | NEW |