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

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

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/mjsunit/runtime-gen/globalproxy.js » ('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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); 1634 const v8::HeapGraphNode* global = GetGlobalObject(snapshot);
1635 const v8::HeapGraphNode* builtins = 1635 const v8::HeapGraphNode* builtins =
1636 GetProperty(global, v8::HeapGraphEdge::kInternal, "builtins"); 1636 GetProperty(global, v8::HeapGraphEdge::kInternal, "builtins");
1637 CHECK_NE(NULL, builtins); 1637 CHECK_NE(NULL, builtins);
1638 const v8::HeapGraphNode* native_context = 1638 const v8::HeapGraphNode* native_context =
1639 GetProperty(global, v8::HeapGraphEdge::kInternal, "native_context"); 1639 GetProperty(global, v8::HeapGraphEdge::kInternal, "native_context");
1640 CHECK_NE(NULL, native_context); 1640 CHECK_NE(NULL, native_context);
1641 const v8::HeapGraphNode* global_context = 1641 const v8::HeapGraphNode* global_context =
1642 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_context"); 1642 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_context");
1643 CHECK_NE(NULL, global_context); 1643 CHECK_NE(NULL, global_context);
1644 const v8::HeapGraphNode* global_receiver = 1644 const v8::HeapGraphNode* global_proxy =
1645 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_receiver"); 1645 GetProperty(global, v8::HeapGraphEdge::kInternal, "global_proxy");
1646 CHECK_NE(NULL, global_receiver); 1646 CHECK_NE(NULL, global_proxy);
1647 } 1647 }
1648 1648
1649 1649
1650 TEST(NoHandleLeaks) { 1650 TEST(NoHandleLeaks) {
1651 LocalContext env; 1651 LocalContext env;
1652 v8::HandleScope scope(env->GetIsolate()); 1652 v8::HandleScope scope(env->GetIsolate());
1653 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler(); 1653 v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
1654 1654
1655 CompileRun("document = { URL:\"abcdefgh\" };"); 1655 CompileRun("document = { URL:\"abcdefgh\" };");
1656 1656
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 map.AddRange(ToAddress(0x180), 0x80, 6U); 2677 map.AddRange(ToAddress(0x180), 0x80, 6U);
2678 map.AddRange(ToAddress(0x180), 0x80, 7U); 2678 map.AddRange(ToAddress(0x180), 0x80, 7U);
2679 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); 2679 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180)));
2680 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); 2680 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200)));
2681 CHECK_EQ(3, static_cast<int>(map.size())); 2681 CHECK_EQ(3, static_cast<int>(map.size()));
2682 2682
2683 map.Clear(); 2683 map.Clear();
2684 CHECK_EQ(0, static_cast<int>(map.size())); 2684 CHECK_EQ(0, static_cast<int>(map.size()));
2685 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); 2685 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400)));
2686 } 2686 }
OLDNEW
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/mjsunit/runtime-gen/globalproxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698