Reviewers: Sven Panne,
Message:
Please take a quick look.
Description:
USE() unused variables in test-heap-profiler.cc to fix compilation with
GCC-4.6
TEST=GCC-4.6's face gleaming with happiness
Please review this at https://chromiumcodereview.appspot.com/10001009/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/cctest/test-heap-profiler.cc
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc
b/test/cctest/test-heap-profiler.cc
index
1404fecd97cab20ef3371c4a3985885560fc1a90..e9ab3352e061b47d1983cd55658f8b32d2bbbb51
100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -52,6 +52,9 @@ class NamedEntriesDetector {
} // namespace
+template <typename T> static void USE(T) { }
+
+
static const v8::HeapGraphNode* GetGlobalObject(
const v8::HeapSnapshot* snapshot) {
CHECK_EQ(2, snapshot->GetRoot()->GetChildrenCount());
@@ -775,6 +778,7 @@ TEST(HeapSnapshotObjectsStats) {
{
v8::HandleScope inner_scope_1;
v8::Local<v8::String> string1 = v8_str("string1");
+ USE(string1);
{
// Single chunk of data with one new entry expected in update.
TestStatsStream stats_update = GetHeapStatsUpdate();
@@ -790,11 +794,14 @@ TEST(HeapSnapshotObjectsStats) {
{
v8::HandleScope inner_scope_2;
v8::Local<v8::String> string2 = v8_str("string2");
+ USE(string2);
{
v8::HandleScope inner_scope_3;
v8::Handle<v8::String> string3 = v8::String::New("string3");
v8::Handle<v8::String> string4 = v8::String::New("string4");
+ USE(string3);
+ USE(string4);
{
// Single chunk of data with three new entries expected in
update.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev