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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 // so as to avoid possible warnings about linker duplicates. | 768 // so as to avoid possible warnings about linker duplicates. |
769 // Override operator new to allocate IntNode subtype objects onto | 769 // Override operator new to allocate IntNode subtype objects onto |
770 // the dedicated heap for blink::Node. | 770 // the dedicated heap for blink::Node. |
771 // | 771 // |
772 // TODO(haraken): untangling the heap unit tests from Blink would | 772 // TODO(haraken): untangling the heap unit tests from Blink would |
773 // simplify and avoid running into this problem - http://crbug.com/425381 | 773 // simplify and avoid running into this problem - http://crbug.com/425381 |
774 GC_PLUGIN_IGNORE("crbug.com/443854") | 774 GC_PLUGIN_IGNORE("crbug.com/443854") |
775 void* operator new(size_t size) | 775 void* operator new(size_t size) |
776 { | 776 { |
777 ThreadState* state = ThreadState::current(); | 777 ThreadState* state = ThreadState::current(); |
778 return Heap::allocateOnArenaIndex(state, size, BlinkGC::NodeArenaIndex,
GCInfoTrait<IntNode>::index()); | 778 const char* typeName = WTF_HEAP_PROFILER_TYPE_NAME(IntNode); |
| 779 return Heap::allocateOnArenaIndex(state, size, BlinkGC::NodeArenaIndex,
GCInfoTrait<IntNode>::index(), typeName); |
779 } | 780 } |
780 | 781 |
781 static IntNode* create(int i) | 782 static IntNode* create(int i) |
782 { | 783 { |
783 return new IntNode(i); | 784 return new IntNode(i); |
784 } | 785 } |
785 | 786 |
786 DEFINE_INLINE_TRACE() { } | 787 DEFINE_INLINE_TRACE() { } |
787 | 788 |
788 int value() { return m_value; } | 789 int value() { return m_value; } |
(...skipping 5741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6530 EXPECT_EQ(1u, vector2.size()); | 6531 EXPECT_EQ(1u, vector2.size()); |
6531 // TODO(Oilpan): when Vector.h's contiguous container support no longer disables | 6532 // TODO(Oilpan): when Vector.h's contiguous container support no longer disables |
6532 // Vector<>s with inline capacity, remove. | 6533 // Vector<>s with inline capacity, remove. |
6533 #if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) | 6534 #if !defined(ANNOTATE_CONTIGUOUS_CONTAINER) |
6534 EXPECT_EQ(16u, vector1.capacity()); | 6535 EXPECT_EQ(16u, vector1.capacity()); |
6535 EXPECT_EQ(16u, vector2.capacity()); | 6536 EXPECT_EQ(16u, vector2.capacity()); |
6536 #endif | 6537 #endif |
6537 } | 6538 } |
6538 | 6539 |
6539 } // namespace blink | 6540 } // namespace blink |
OLD | NEW |