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

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

Issue 16267005: [oilpan] Add checks to new operator Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 6 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
« Source/heap/Heap.h ('K') | « Source/heap/Heap.h ('k') | no next file » | 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 54 public:
55 int payload; 55 int payload;
56 }; 56 };
57 57
58 DEFINE_GC_TYPE_MARKER(HeapTestSuperClass); 58 DEFINE_GC_TYPE_MARKER(HeapTestSuperClass);
59 59
60 static const size_t classMagic = 0xABCDDBCA; 60 static const size_t classMagic = 0xABCDDBCA;
61 61
62 class HeapTestSubClass : public HeapTestOtherSuperClass, public HeapTestSuperCla ss { 62 class HeapTestSubClass : public HeapTestOtherSuperClass, public HeapTestSuperCla ss {
63 public: 63 public:
64 OVERRIDE_NEW(HeapTestSubClass)
64 HeapTestSubClass() : m_magic(classMagic) { } 65 HeapTestSubClass() : m_magic(classMagic) { }
65 66
66 virtual ~HeapTestSubClass() 67 virtual ~HeapTestSubClass()
67 { 68 {
68 EXPECT_EQ(classMagic, m_magic); 69 EXPECT_EQ(classMagic, m_magic);
69 ++s_destructorCalls; 70 ++s_destructorCalls;
70 Heap::collectGarbage(); // Do a nested garbage collection to verify corr ect finalization order. 71 Heap::collectGarbage(); // Do a nested garbage collection to verify corr ect finalization order.
71 EXPECT_EQ(classMagic, m_magic); // Contents should not be zapped by a ne sted GC. 72 EXPECT_EQ(classMagic, m_magic); // Contents should not be zapped by a ne sted GC.
72 } 73 }
73 74
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 { 775 {
775 HeapTester::memberTest(); 776 HeapTester::memberTest();
776 } 777 }
777 778
778 TEST(heap, WeakOnHeap) 779 TEST(heap, WeakOnHeap)
779 { 780 {
780 HeapTester::weakOnHeapTest(); 781 HeapTester::weakOnHeapTest();
781 } 782 }
782 783
783 } // namespace WebCore 784 } // namespace WebCore
OLDNEW
« Source/heap/Heap.h ('K') | « Source/heap/Heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698