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

Side by Side Diff: third_party/WebKit/Source/platform/heap/HeapTest.cpp

Issue 2599643004: Remove unwanted declaration of storage for NeedsAdjustAndMark<>. (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.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 4825 matching lines...) Expand 10 before | Expand all | Expand 10 after
4836 4836
4837 volatile bool GCParkingThreadTester::s_sleeperRunning = false; 4837 volatile bool GCParkingThreadTester::s_sleeperRunning = false;
4838 volatile bool GCParkingThreadTester::s_sleeperDone = false; 4838 volatile bool GCParkingThreadTester::s_sleeperDone = false;
4839 4839
4840 TEST(HeapTest, GCParkingTimeout) { 4840 TEST(HeapTest, GCParkingTimeout) {
4841 GCParkingThreadTester::test(); 4841 GCParkingThreadTester::test();
4842 } 4842 }
4843 4843
4844 TEST(HeapTest, NeedsAdjustAndMark) { 4844 TEST(HeapTest, NeedsAdjustAndMark) {
4845 // class Mixin : public GarbageCollectedMixin {}; 4845 // class Mixin : public GarbageCollectedMixin {};
4846 EXPECT_TRUE(NeedsAdjustAndMark<Mixin>::value); 4846 static_assert(NeedsAdjustAndMark<Mixin>::value,
4847 EXPECT_TRUE(NeedsAdjustAndMark<const Mixin>::value); 4847 "A Mixin pointer needs adjustment");
4848 static_assert(NeedsAdjustAndMark<Mixin>::value,
4849 "A const Mixin pointer needs adjustment");
4848 4850
4849 // class SimpleObject : public GarbageCollected<SimpleObject> {}; 4851 // class SimpleObject : public GarbageCollected<SimpleObject> {};
4850 EXPECT_FALSE(NeedsAdjustAndMark<SimpleObject>::value); 4852 static_assert(!NeedsAdjustAndMark<SimpleObject>::value,
4851 EXPECT_FALSE(NeedsAdjustAndMark<const SimpleObject>::value); 4853 "A SimpleObject pointer does not need adjustment");
4854 static_assert(!NeedsAdjustAndMark<const SimpleObject>::value,
4855 "A const SimpleObject pointer does not need adjustment");
4852 4856
4853 // class UseMixin : public SimpleObject, public Mixin {}; 4857 // class UseMixin : public SimpleObject, public Mixin {};
4854 EXPECT_FALSE(NeedsAdjustAndMark<UseMixin>::value); 4858 static_assert(!NeedsAdjustAndMark<UseMixin>::value,
4855 EXPECT_FALSE(NeedsAdjustAndMark<const UseMixin>::value); 4859 "A UseMixin pointer does not need adjustment");
4860 static_assert(!NeedsAdjustAndMark<const UseMixin>::value,
4861 "A const UseMixin pointer does not need adjustment");
4856 } 4862 }
4857 4863
4858 template <typename Set> 4864 template <typename Set>
4859 void setWithCustomWeaknessHandling() { 4865 void setWithCustomWeaknessHandling() {
4860 typedef typename Set::iterator Iterator; 4866 typedef typename Set::iterator Iterator;
4861 Persistent<IntWrapper> livingInt(IntWrapper::create(42)); 4867 Persistent<IntWrapper> livingInt(IntWrapper::create(42));
4862 Persistent<Set> set1(new Set()); 4868 Persistent<Set> set1(new Set());
4863 { 4869 {
4864 Set set2; 4870 Set set2;
4865 Set* set3 = new Set(); 4871 Set* set3 = new Set();
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
6799 "HeapVector"); 6805 "HeapVector");
6800 static_assert( 6806 static_assert(
6801 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value, 6807 WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::value,
6802 "HeapDeque"); 6808 "HeapDeque");
6803 static_assert(WTF::IsGarbageCollectedType< 6809 static_assert(WTF::IsGarbageCollectedType<
6804 HeapTerminatedArray<Member<IntWrapper>>>::value, 6810 HeapTerminatedArray<Member<IntWrapper>>>::value,
6805 "HeapTerminatedArray"); 6811 "HeapTerminatedArray");
6806 } 6812 }
6807 6813
6808 } // namespace blink 6814 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/GarbageCollected.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698