| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 pageObject: 4, // The idea is to track separately the objects owned by t
he page and the objects owned by debugger. | 41 pageObject: 4, // The idea is to track separately the objects owned by t
he page and the objects owned by debugger. |
| 42 | 42 |
| 43 visitedMarkerMask: 0x0ffff, // bits: 0,1111,1111,1111,1111 | 43 visitedMarkerMask: 0x0ffff, // bits: 0,1111,1111,1111,1111 |
| 44 visitedMarker: 0x10000 // bits: 1,0000,0000,0000,0000 | 44 visitedMarker: 0x10000 // bits: 1,0000,0000,0000,0000 |
| 45 }; | 45 }; |
| 46 this._lazyStringCache = { }; | 46 this._lazyStringCache = { }; |
| 47 WebInspector.HeapSnapshot.call(this, profile, progress); | 47 WebInspector.HeapSnapshot.call(this, profile, progress); |
| 48 } | 48 } |
| 49 | 49 |
| 50 WebInspector.JSHeapSnapshot.prototype = { | 50 WebInspector.JSHeapSnapshot.prototype = { |
| 51 maxJsNodeId: function() |
| 52 { |
| 53 var nodeFieldCount = this._nodeFieldCount; |
| 54 var nodes = this._nodes; |
| 55 var nodesLength = nodes.length; |
| 56 var id = 0; |
| 57 for (var nodeIndex = this._nodeIdOffset; nodeIndex < nodesLength; nodeIn
dex += nodeFieldCount) { |
| 58 var nextId = nodes[nodeIndex]; |
| 59 // JS objects have odd ids, skip native objects. |
| 60 if (nextId % 2 === 0) |
| 61 continue; |
| 62 if (id < nodes[nodeIndex]) |
| 63 id = nodes[nodeIndex]; |
| 64 } |
| 65 return id; |
| 66 }, |
| 67 |
| 51 createNode: function(nodeIndex) | 68 createNode: function(nodeIndex) |
| 52 { | 69 { |
| 53 return new WebInspector.JSHeapSnapshotNode(this, nodeIndex); | 70 return new WebInspector.JSHeapSnapshotNode(this, nodeIndex); |
| 54 }, | 71 }, |
| 55 | 72 |
| 56 createEdge: function(edges, edgeIndex) | 73 createEdge: function(edges, edgeIndex) |
| 57 { | 74 { |
| 58 return new WebInspector.JSHeapSnapshotEdge(this, edges, edgeIndex); | 75 return new WebInspector.JSHeapSnapshotEdge(this, edges, edgeIndex); |
| 59 }, | 76 }, |
| 60 | 77 |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 }, | 692 }, |
| 676 | 693 |
| 677 isWeak: function() | 694 isWeak: function() |
| 678 { | 695 { |
| 679 return this._edge().isWeak(); | 696 return this._edge().isWeak(); |
| 680 }, | 697 }, |
| 681 | 698 |
| 682 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype | 699 __proto__: WebInspector.HeapSnapshotRetainerEdge.prototype |
| 683 } | 700 } |
| 684 | 701 |
| OLD | NEW |