OLD | NEW |
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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); | 254 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); |
255 const v8::HeapGraphNode* f = | 255 const v8::HeapGraphNode* f = |
256 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction"); | 256 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction"); |
257 CHECK(f); | 257 CHECK(f); |
258 CHECK_EQ(v8::String::NewFromUtf8(env->GetIsolate(), "native_bind"), | 258 CHECK_EQ(v8::String::NewFromUtf8(env->GetIsolate(), "native_bind"), |
259 f->GetName()); | 259 f->GetName()); |
260 const v8::HeapGraphNode* bindings = | 260 const v8::HeapGraphNode* bindings = |
261 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings"); | 261 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings"); |
262 CHECK_NE(NULL, bindings); | 262 CHECK_NE(NULL, bindings); |
263 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType()); | 263 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType()); |
264 CHECK_EQ(4, bindings->GetChildrenCount()); | 264 CHECK_EQ(3, bindings->GetChildrenCount()); |
265 | 265 |
266 const v8::HeapGraphNode* bound_this = GetProperty( | 266 const v8::HeapGraphNode* bound_this = GetProperty( |
267 f, v8::HeapGraphEdge::kShortcut, "bound_this"); | 267 f, v8::HeapGraphEdge::kShortcut, "bound_this"); |
268 CHECK(bound_this); | 268 CHECK(bound_this); |
269 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType()); | 269 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType()); |
270 | 270 |
271 const v8::HeapGraphNode* bound_function = GetProperty( | 271 const v8::HeapGraphNode* bound_function = GetProperty( |
272 f, v8::HeapGraphEdge::kShortcut, "bound_function"); | 272 f, v8::HeapGraphEdge::kShortcut, "bound_function"); |
273 CHECK(bound_function); | 273 CHECK(bound_function); |
274 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType()); | 274 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType()); |
(...skipping 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2838 map.AddRange(ToAddress(0x180), 0x80, 6U); | 2838 map.AddRange(ToAddress(0x180), 0x80, 6U); |
2839 map.AddRange(ToAddress(0x180), 0x80, 7U); | 2839 map.AddRange(ToAddress(0x180), 0x80, 7U); |
2840 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); | 2840 CHECK_EQ(7, map.GetTraceNodeId(ToAddress(0x180))); |
2841 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); | 2841 CHECK_EQ(5, map.GetTraceNodeId(ToAddress(0x200))); |
2842 CHECK_EQ(3, static_cast<int>(map.size())); | 2842 CHECK_EQ(3, static_cast<int>(map.size())); |
2843 | 2843 |
2844 map.Clear(); | 2844 map.Clear(); |
2845 CHECK_EQ(0, static_cast<int>(map.size())); | 2845 CHECK_EQ(0, static_cast<int>(map.size())); |
2846 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); | 2846 CHECK_EQ(0, map.GetTraceNodeId(ToAddress(0x400))); |
2847 } | 2847 } |
OLD | NEW |