| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 ThreadState::~ThreadState() | 361 ThreadState::~ThreadState() |
| 362 { | 362 { |
| 363 checkThread(); | 363 checkThread(); |
| 364 delete m_weakCallbackStack; | 364 delete m_weakCallbackStack; |
| 365 m_weakCallbackStack = 0; | 365 m_weakCallbackStack = 0; |
| 366 for (int i = 0; i < NumberOfHeaps; i++) | 366 for (int i = 0; i < NumberOfHeaps; i++) |
| 367 delete m_heaps[i]; | 367 delete m_heaps[i]; |
| 368 deleteAllValues(m_interruptors); | 368 deleteAllValues(m_interruptors); |
| 369 **s_threadSpecific = 0; | 369 **s_threadSpecific = 0; |
| 370 s_mainThreadStackStart = 0; | 370 if (isMainThread()) { |
| 371 s_mainThreadUnderestimatedStackSize = 0; | 371 s_mainThreadStackStart = 0; |
| 372 s_mainThreadUnderestimatedStackSize = 0; |
| 373 } |
| 372 } | 374 } |
| 373 | 375 |
| 374 void ThreadState::init() | 376 void ThreadState::init() |
| 375 { | 377 { |
| 376 s_threadSpecific = new WTF::ThreadSpecific<ThreadState*>(); | 378 s_threadSpecific = new WTF::ThreadSpecific<ThreadState*>(); |
| 377 s_safePointBarrier = new SafePointBarrier; | 379 s_safePointBarrier = new SafePointBarrier; |
| 378 } | 380 } |
| 379 | 381 |
| 380 void ThreadState::shutdown() | 382 void ThreadState::shutdown() |
| 381 { | 383 { |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1273 return gcInfo; | 1275 return gcInfo; |
| 1274 } | 1276 } |
| 1275 } | 1277 } |
| 1276 if (needLockForIteration) | 1278 if (needLockForIteration) |
| 1277 threadAttachMutex().unlock(); | 1279 threadAttachMutex().unlock(); |
| 1278 return 0; | 1280 return 0; |
| 1279 } | 1281 } |
| 1280 #endif | 1282 #endif |
| 1281 | 1283 |
| 1282 } | 1284 } |
| OLD | NEW |