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

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

Issue 2193993002: [heap profiler] Use internal type links for bound this and target function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 | « src/profiler/heap-snapshot-generator.cc ('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 // 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 const v8::HeapGraphNode* f = 249 const v8::HeapGraphNode* f =
250 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction"); 250 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction");
251 CHECK(f); 251 CHECK(f);
252 CHECK(v8_str("native_bind")->Equals(env.local(), f->GetName()).FromJust()); 252 CHECK(v8_str("native_bind")->Equals(env.local(), f->GetName()).FromJust());
253 const v8::HeapGraphNode* bindings = 253 const v8::HeapGraphNode* bindings =
254 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings"); 254 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings");
255 CHECK(bindings); 255 CHECK(bindings);
256 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType()); 256 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType());
257 CHECK_EQ(1, bindings->GetChildrenCount()); 257 CHECK_EQ(1, bindings->GetChildrenCount());
258 258
259 const v8::HeapGraphNode* bound_this = GetProperty( 259 const v8::HeapGraphNode* bound_this =
260 f, v8::HeapGraphEdge::kShortcut, "bound_this"); 260 GetProperty(f, v8::HeapGraphEdge::kInternal, "bound_this");
261 CHECK(bound_this); 261 CHECK(bound_this);
262 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType()); 262 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType());
263 263
264 const v8::HeapGraphNode* bound_function = GetProperty( 264 const v8::HeapGraphNode* bound_function =
265 f, v8::HeapGraphEdge::kShortcut, "bound_function"); 265 GetProperty(f, v8::HeapGraphEdge::kInternal, "bound_function");
266 CHECK(bound_function); 266 CHECK(bound_function);
267 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType()); 267 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType());
268 268
269 const v8::HeapGraphNode* bound_argument = GetProperty( 269 const v8::HeapGraphNode* bound_argument = GetProperty(
270 f, v8::HeapGraphEdge::kShortcut, "bound_argument_1"); 270 f, v8::HeapGraphEdge::kShortcut, "bound_argument_1");
271 CHECK(bound_argument); 271 CHECK(bound_argument);
272 CHECK_EQ(v8::HeapGraphNode::kObject, bound_argument->GetType()); 272 CHECK_EQ(v8::HeapGraphNode::kObject, bound_argument->GetType());
273 } 273 }
274 274
275 275
(...skipping 2774 matching lines...) Expand 10 before | Expand all | Expand 10 after
3050 " a[i] = i;\n" 3050 " a[i] = i;\n"
3051 " for (var i = 0; i < 3; ++i)\n" 3051 " for (var i = 0; i < 3; ++i)\n"
3052 " a.shift();\n" 3052 " a.shift();\n"
3053 "}\n"); 3053 "}\n");
3054 3054
3055 CcTest::heap()->CollectGarbage(v8::internal::NEW_SPACE); 3055 CcTest::heap()->CollectGarbage(v8::internal::NEW_SPACE);
3056 // Should not crash. 3056 // Should not crash.
3057 3057
3058 heap_profiler->StopSamplingHeapProfiler(); 3058 heap_profiler->StopSamplingHeapProfiler();
3059 } 3059 }
OLDNEW
« no previous file with comments | « src/profiler/heap-snapshot-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698