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

Side by Side Diff: Source/heap/HeapTest.cpp

Issue 187483002: Oilpan: We need to collect all garbage before shutting down the worker thread (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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
« no previous file with comments | « Source/heap/Heap.cpp ('k') | Source/heap/ThreadState.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 Heap::collectGarbage(ThreadState::HeapPointersOnStack); 296 Heap::collectGarbage(ThreadState::HeapPointersOnStack);
297 gcCount++; 297 gcCount++;
298 atomicIncrement(&m_gcCount); 298 atomicIncrement(&m_gcCount);
299 } 299 }
300 300
301 EXPECT_EQ(wrapper->value(), 0x0bbac0de); 301 EXPECT_EQ(wrapper->value(), 0x0bbac0de);
302 EXPECT_EQ((*globalPersistent)->value(), 0x0ed0cabb); 302 EXPECT_EQ((*globalPersistent)->value(), 0x0ed0cabb);
303 } 303 }
304 yield(); 304 yield();
305 } 305 }
306 ThreadState::current()->cleanup();
307 ThreadState::detach(); 306 ThreadState::detach();
308 atomicDecrement(&m_threadsToFinish); 307 atomicDecrement(&m_threadsToFinish);
309 } 308 }
310 309
311 volatile int m_gcCount; 310 volatile int m_gcCount;
312 volatile int m_threadsToFinish; 311 volatile int m_threadsToFinish;
313 }; 312 };
314 313
315 // The accounting for memory includes the memory used by rounding up object 314 // The accounting for memory includes the memory used by rounding up object
316 // sizes. This is done in a different way on 32 bit and 64 bit, so we have to 315 // sizes. This is done in a different way on 32 bit and 64 bit, so we have to
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2623 2622
2624 namespace WTF { 2623 namespace WTF {
2625 2624
2626 // We need the below vector trait specialization for the above HeapVectors to be have correctly wrt. memset, memcmp etc. 2625 // We need the below vector trait specialization for the above HeapVectors to be have correctly wrt. memset, memcmp etc.
2627 template<> struct VectorTraits<WebCore::VectorObject> : public SimpleClassVector Traits<WebCore::VectorObject> { }; 2626 template<> struct VectorTraits<WebCore::VectorObject> : public SimpleClassVector Traits<WebCore::VectorObject> { };
2628 template<> struct VectorTraits<WebCore::VectorObjectInheritedTrace> : public Sim pleClassVectorTraits<WebCore::VectorObjectInheritedTrace> { }; 2627 template<> struct VectorTraits<WebCore::VectorObjectInheritedTrace> : public Sim pleClassVectorTraits<WebCore::VectorObjectInheritedTrace> { };
2629 template<> struct VectorTraits<WebCore::VectorObjectNoTrace> : public SimpleClas sVectorTraits<WebCore::VectorObjectNoTrace> { }; 2628 template<> struct VectorTraits<WebCore::VectorObjectNoTrace> : public SimpleClas sVectorTraits<WebCore::VectorObjectNoTrace> { };
2630 2629
2631 } // WTF namespace 2630 } // WTF namespace
2632 2631
OLDNEW
« no previous file with comments | « Source/heap/Heap.cpp ('k') | Source/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698