Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(378)

Side by Side Diff: Source/platform/heap/ThreadState.cpp

Issue 840223002: Oilpan: Remove duplicated code between HeapPage and LargeObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« Source/platform/heap/Heap.cpp ('K') | « Source/platform/heap/ThreadState.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698