| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 { | 132 { |
| 133 var start = text.indexOf(open); | 133 var start = text.indexOf(open); |
| 134 var end = text.lastIndexOf(close); | 134 var end = text.lastIndexOf(close); |
| 135 var length = end - start - 1; | 135 var length = end - start - 1; |
| 136 if (start === -1 || end === -1 || end < start) | 136 if (start === -1 || end === -1 || end < start) |
| 137 length = -1; | 137 length = -1; |
| 138 return {start: start, end: end, length: length}; | 138 return {start: start, end: end, length: length}; |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 WebInspector.JSONView.prototype = { | 141 WebInspector.JSONView.prototype = { |
| 142 /** |
| 143 * @override |
| 144 */ |
| 142 wasShown: function() | 145 wasShown: function() |
| 143 { | 146 { |
| 144 this._initialize(); | 147 this._initialize(); |
| 145 }, | 148 }, |
| 146 | 149 |
| 147 _initialize: function() | 150 _initialize: function() |
| 148 { | 151 { |
| 149 if (this._initialized) | 152 if (this._initialized) |
| 150 return; | 153 return; |
| 151 this._initialized = true; | 154 this._initialized = true; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 * @param {*} data | 306 * @param {*} data |
| 304 * @param {string} prefix | 307 * @param {string} prefix |
| 305 * @param {string} suffix | 308 * @param {string} suffix |
| 306 */ | 309 */ |
| 307 WebInspector.ParsedJSON = function(data, prefix, suffix) | 310 WebInspector.ParsedJSON = function(data, prefix, suffix) |
| 308 { | 311 { |
| 309 this.data = data; | 312 this.data = data; |
| 310 this.prefix = prefix; | 313 this.prefix = prefix; |
| 311 this.suffix = suffix; | 314 this.suffix = suffix; |
| 312 }; | 315 }; |
| OLD | NEW |