| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 this._snapshot = {}; | 51 this._snapshot = {}; |
| 52 }, | 52 }, |
| 53 | 53 |
| 54 close: function() | 54 close: function() |
| 55 { | 55 { |
| 56 if (this._json) | 56 if (this._json) |
| 57 this._parseStringsArray(); | 57 this._parseStringsArray(); |
| 58 }, | 58 }, |
| 59 | 59 |
| 60 /** | 60 /** |
| 61 * @param {boolean} showHiddenData |
| 61 * @return {!WebInspector.JSHeapSnapshot} | 62 * @return {!WebInspector.JSHeapSnapshot} |
| 62 */ | 63 */ |
| 63 buildSnapshot: function(constructorName) | 64 buildSnapshot: function(showHiddenData) |
| 64 { | 65 { |
| 65 this._progress.updateStatus("Processing snapshot\u2026"); | 66 this._progress.updateStatus("Processing snapshot\u2026"); |
| 66 var result = new WebInspector.JSHeapSnapshot(this._snapshot, this._progr
ess); | 67 var result = new WebInspector.JSHeapSnapshot(this._snapshot, this._progr
ess, showHiddenData); |
| 67 this._reset(); | 68 this._reset(); |
| 68 return result; | 69 return result; |
| 69 }, | 70 }, |
| 70 | 71 |
| 71 _parseUintArray: function() | 72 _parseUintArray: function() |
| 72 { | 73 { |
| 73 var index = 0; | 74 var index = 0; |
| 74 var char0 = "0".charCodeAt(0), char9 = "9".charCodeAt(0), closingBracket
= "]".charCodeAt(0); | 75 var char0 = "0".charCodeAt(0), char9 = "9".charCodeAt(0), closingBracket
= "]".charCodeAt(0); |
| 75 var length = this._json.length; | 76 var length = this._json.length; |
| 76 while (true) { | 77 while (true) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 this._json = this._json.slice(bracketIndex); | 260 this._json = this._json.slice(bracketIndex); |
| 260 this._state = "accumulate-strings"; | 261 this._state = "accumulate-strings"; |
| 261 break; | 262 break; |
| 262 } | 263 } |
| 263 case "accumulate-strings": | 264 case "accumulate-strings": |
| 264 return; | 265 return; |
| 265 } | 266 } |
| 266 } | 267 } |
| 267 } | 268 } |
| 268 }; | 269 }; |
| OLD | NEW |