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

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

Issue 1721333002: Bug fix: Add BlinkGC allocation hooks to CSS, Node and vector/table backing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use COMMA Created 4 years, 9 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/HeapAllocator.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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/heap/HeapAllocator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698