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 6268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6279 | 6279 |
6280 static int sTraceCalls; | 6280 static int sTraceCalls; |
6281 static int sTraceLazy; | 6281 static int sTraceLazy; |
6282 }; | 6282 }; |
6283 | 6283 |
6284 int DeepEagerly::sTraceCalls = 0; | 6284 int DeepEagerly::sTraceCalls = 0; |
6285 int DeepEagerly::sTraceLazy = 0; | 6285 int DeepEagerly::sTraceLazy = 0; |
6286 | 6286 |
6287 TEST(HeapTest, TraceDeepEagerly) | 6287 TEST(HeapTest, TraceDeepEagerly) |
6288 { | 6288 { |
6289 #if !ENABLE(ASSERT) | 6289 // The allocation & GC overhead is considerable for this test, |
| 6290 // straining debug builds and lower-end targets too much to be |
| 6291 // worth running. |
| 6292 #if !ENABLE(ASSERT) && !OS(ANDROID) |
6290 DeepEagerly* obj = nullptr; | 6293 DeepEagerly* obj = nullptr; |
6291 for (int i = 0; i < 10000000; i++) | 6294 for (int i = 0; i < 10000000; i++) |
6292 obj = new DeepEagerly(obj); | 6295 obj = new DeepEagerly(obj); |
6293 | 6296 |
6294 Persistent<DeepEagerly> persistent(obj); | 6297 Persistent<DeepEagerly> persistent(obj); |
6295 preciselyCollectGarbage(); | 6298 preciselyCollectGarbage(); |
6296 | 6299 |
6297 // Verify that the DeepEagerly chain isn't completely unravelled | 6300 // Verify that the DeepEagerly chain isn't completely unravelled |
6298 // by performing eager trace() calls, but the explicit mark | 6301 // by performing eager trace() calls, but the explicit mark |
6299 // stack is switched once some nesting limit is exceeded. | 6302 // stack is switched once some nesting limit is exceeded. |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6943 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe
r>>>::value, "HeapLinkedHashSet"); | 6946 static_assert(WTF::IsGarbageCollectedType<HeapLinkedHashSet<Member<IntWrappe
r>>>::value, "HeapLinkedHashSet"); |
6944 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper>
>>::value, "HeapListHashSet"); | 6947 static_assert(WTF::IsGarbageCollectedType<HeapListHashSet<Member<IntWrapper>
>>::value, "HeapListHashSet"); |
6945 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp
er>>>::value, "HeapHashCountedSet"); | 6948 static_assert(WTF::IsGarbageCollectedType<HeapHashCountedSet<Member<IntWrapp
er>>>::value, "HeapHashCountedSet"); |
6946 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper
>>>::value, "HeapHashMap"); | 6949 static_assert(WTF::IsGarbageCollectedType<HeapHashMap<int, Member<IntWrapper
>>>::value, "HeapHashMap"); |
6947 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v
alue, "HeapVector"); | 6950 static_assert(WTF::IsGarbageCollectedType<HeapVector<Member<IntWrapper>>>::v
alue, "HeapVector"); |
6948 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va
lue, "HeapDeque"); | 6951 static_assert(WTF::IsGarbageCollectedType<HeapDeque<Member<IntWrapper>>>::va
lue, "HeapDeque"); |
6949 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap
per>>>::value, "HeapTerminatedArray"); | 6952 static_assert(WTF::IsGarbageCollectedType<HeapTerminatedArray<Member<IntWrap
per>>>::value, "HeapTerminatedArray"); |
6950 } | 6953 } |
6951 | 6954 |
6952 } // namespace blink | 6955 } // namespace blink |
OLD | NEW |