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

Side by Side Diff: test/cctest/test-heap-profiler.cc

Issue 716833002: Various clean-ups after top-level lexical declarations are done. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Patch for landing Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « test/cctest/test-decls.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1701 matching lines...) Expand 10 before | Expand all | Expand 10 after
1712 const v8::HeapSnapshot* snapshot = 1712 const v8::HeapSnapshot* snapshot =
1713 heap_profiler->TakeHeapSnapshot(v8_str("snapshot")); 1713 heap_profiler->TakeHeapSnapshot(v8_str("snapshot"));
1714 CHECK(ValidateSnapshot(snapshot)); 1714 CHECK(ValidateSnapshot(snapshot));
1715 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); 1715 const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
1716 const v8::HeapGraphNode* builtins = 1716 const v8::HeapGraphNode* builtins =
1717 GetProperty(global, v8::HeapGraphEdge::kInternal, "builtins"); 1717 GetProperty(global, v8::HeapGraphEdge::kInternal, "builtins");
1718 CHECK_NE(NULL, builtins); 1718 CHECK_NE(NULL, builtins);
1719 const v8::HeapGraphNode* native_context = 1719 const v8::HeapGraphNode* native_context =
1720 GetProperty(global, v8::HeapGraphEdge::kInternal, "native_context"); 1720 GetProperty(global, v8::HeapGraphEdge::kInternal, "native_context");
1721 CHECK_NE(NULL, native_context); 1721 CHECK_NE(NULL, native_context);
1722 const v8::HeapGraphNode* global_context =
1723 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_context");
1724 CHECK_NE(NULL, global_context);
1725 const v8::HeapGraphNode* global_proxy = 1722 const v8::HeapGraphNode* global_proxy =
1726 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_proxy"); 1723 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_proxy");
1727 CHECK_NE(NULL, global_proxy); 1724 CHECK_NE(NULL, global_proxy);
1728 } 1725 }
1729 1726
1730 1727
1731 TEST(NoHandleLeaks) { 1728 TEST(NoHandleLeaks) {
1732 LocalContext env; 1729 LocalContext env;
1733 v8::HandleScope scope(env->GetIsolate()); 1730 v8::HandleScope scope(env->GetIsolate());
1734 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); 1731 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
(...skipping 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
2797 map.AddRange(ToAddress(0x180), 0x80, 6U); 2794 map.AddRange(ToAddress(0x180), 0x80, 6U);
2798 map.AddRange(ToAddress(0x180), 0x80, 7U); 2795 map.AddRange(ToAddress(0x180), 0x80, 7U);
2799 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); 2796 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180)));
2800 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); 2797 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200)));
2801 CHECK_EQ(3, static_cast<int>(map.size())); 2798 CHECK_EQ(3, static_cast<int>(map.size()));
2802 2799
2803 map.Clear(); 2800 map.Clear();
2804 CHECK_EQ(0, static_cast<int>(map.size())); 2801 CHECK_EQ(0, static_cast<int>(map.size()));
2805 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); 2802 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400)));
2806 } 2803 }
OLDNEW
« no previous file with comments | « test/cctest/test-decls.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698