| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 CHECK(ValidateSnapshot(snapshot)); | 244 CHECK(ValidateSnapshot(snapshot)); |
| 245 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); | 245 const v8::HeapGraphNode* global = GetGlobalObject(snapshot); |
| 246 const v8::HeapGraphNode* f = | 246 const v8::HeapGraphNode* f = |
| 247 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction"); | 247 GetProperty(global, v8::HeapGraphEdge::kProperty, "boundFunction"); |
| 248 CHECK(f); | 248 CHECK(f); |
| 249 CHECK(v8_str("native_bind")->Equals(env.local(), f->GetName()).FromJust()); | 249 CHECK(v8_str("native_bind")->Equals(env.local(), f->GetName()).FromJust()); |
| 250 const v8::HeapGraphNode* bindings = | 250 const v8::HeapGraphNode* bindings = |
| 251 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings"); | 251 GetProperty(f, v8::HeapGraphEdge::kInternal, "bindings"); |
| 252 CHECK(bindings); | 252 CHECK(bindings); |
| 253 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType()); | 253 CHECK_EQ(v8::HeapGraphNode::kArray, bindings->GetType()); |
| 254 CHECK_EQ(1, bindings->GetChildrenCount()); | 254 CHECK_EQ(3, bindings->GetChildrenCount()); |
| 255 | 255 |
| 256 const v8::HeapGraphNode* bound_this = GetProperty( | 256 const v8::HeapGraphNode* bound_this = GetProperty( |
| 257 f, v8::HeapGraphEdge::kShortcut, "bound_this"); | 257 f, v8::HeapGraphEdge::kShortcut, "bound_this"); |
| 258 CHECK(bound_this); | 258 CHECK(bound_this); |
| 259 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType()); | 259 CHECK_EQ(v8::HeapGraphNode::kObject, bound_this->GetType()); |
| 260 | 260 |
| 261 const v8::HeapGraphNode* bound_function = GetProperty( | 261 const v8::HeapGraphNode* bound_function = GetProperty( |
| 262 f, v8::HeapGraphEdge::kShortcut, "bound_function"); | 262 f, v8::HeapGraphEdge::kShortcut, "bound_function"); |
| 263 CHECK(bound_function); | 263 CHECK(bound_function); |
| 264 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType()); | 264 CHECK_EQ(v8::HeapGraphNode::kClosure, bound_function->GetType()); |
| (...skipping 2580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2845 map.AddRange(ToAddress(0x180), 0x80, 6U); | 2845 map.AddRange(ToAddress(0x180), 0x80, 6U); |
| 2846 map.AddRange(ToAddress(0x180), 0x80, 7U); | 2846 map.AddRange(ToAddress(0x180), 0x80, 7U); |
| 2847 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); | 2847 CHECK_EQ(7u, map.GetTraceNodeId(ToAddress(0x180))); |
| 2848 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); | 2848 CHECK_EQ(5u, map.GetTraceNodeId(ToAddress(0x200))); |
| 2849 CHECK_EQ(3u, map.size()); | 2849 CHECK_EQ(3u, map.size()); |
| 2850 | 2850 |
| 2851 map.Clear(); | 2851 map.Clear(); |
| 2852 CHECK_EQ(0u, map.size()); | 2852 CHECK_EQ(0u, map.size()); |
| 2853 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); | 2853 CHECK_EQ(0u, map.GetTraceNodeId(ToAddress(0x400))); |
| 2854 } | 2854 } |
| OLD | NEW |