| 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 private: | 883 private: |
| 884 OwnPtrWillBeMember<SubData> m_data; | 884 OwnPtrWillBeMember<SubData> m_data; |
| 885 }; | 885 }; |
| 886 | 886 |
| 887 int SubClass::s_aliveCount = 0; | 887 int SubClass::s_aliveCount = 0; |
| 888 | 888 |
| 889 class TransitionRefCounted : public RefCountedWillBeRefCountedGarbageCollected<T
ransitionRefCounted> { | 889 class TransitionRefCounted : public RefCountedWillBeRefCountedGarbageCollected<T
ransitionRefCounted> { |
| 890 public: | 890 public: |
| 891 static PassRefPtrWillBeRawPtr<TransitionRefCounted> create() | 891 static PassRefPtrWillBeRawPtr<TransitionRefCounted> create() |
| 892 { | 892 { |
| 893 return adoptRefCountedWillBeRefCountedGarbageCollected(new TransitionRef
Counted()); | 893 return adoptRefWillBeRefCountedGarbageCollected(new TransitionRefCounted
()); |
| 894 } | 894 } |
| 895 | 895 |
| 896 ~TransitionRefCounted() | 896 ~TransitionRefCounted() |
| 897 { | 897 { |
| 898 --s_aliveCount; | 898 --s_aliveCount; |
| 899 } | 899 } |
| 900 | 900 |
| 901 void trace(Visitor* visitor) { } | 901 void trace(Visitor* visitor) { } |
| 902 | 902 |
| 903 static int s_aliveCount; | 903 static int s_aliveCount; |
| (...skipping 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2421 it->value.append(IntWrapper::create(42)); | 2421 it->value.append(IntWrapper::create(42)); |
| 2422 EXPECT_EQ(1u, map->get(key).size()); | 2422 EXPECT_EQ(1u, map->get(key).size()); |
| 2423 | 2423 |
| 2424 Persistent<HeapHashMap<void*, IntVector> > keepAlive(map); | 2424 Persistent<HeapHashMap<void*, IntVector> > keepAlive(map); |
| 2425 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); | 2425 Heap::collectGarbage(ThreadState::NoHeapPointersOnStack); |
| 2426 EXPECT_EQ(1u, map->get(key).size()); | 2426 EXPECT_EQ(1u, map->get(key).size()); |
| 2427 EXPECT_EQ(0, IntWrapper::s_destructorCalls); | 2427 EXPECT_EQ(0, IntWrapper::s_destructorCalls); |
| 2428 } | 2428 } |
| 2429 | 2429 |
| 2430 } // namespace | 2430 } // namespace |
| OLD | NEW |