| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 386 |
| 387 this._type = type; | 387 this._type = type; |
| 388 this._subtype = subtype; | 388 this._subtype = subtype; |
| 389 if (objectId) { | 389 if (objectId) { |
| 390 // handle | 390 // handle |
| 391 this._objectId = objectId; | 391 this._objectId = objectId; |
| 392 this._description = description; | 392 this._description = description; |
| 393 this._hasChildren = (type !== "symbol"); | 393 this._hasChildren = (type !== "symbol"); |
| 394 this._preview = preview; | 394 this._preview = preview; |
| 395 } else { | 395 } else { |
| 396 // Primitive or null object. | 396 this._description = description; |
| 397 this._description = description || (value + ""); | 397 if (!this._description && (typeof value !== "object" || value === null)) |
| 398 this._description = value + ""; |
| 398 this._hasChildren = false; | 399 this._hasChildren = false; |
| 399 if (typeof unserializableValue !== "undefined") { | 400 if (typeof unserializableValue !== "undefined") { |
| 400 this._unserializableValue = unserializableValue; | 401 this._unserializableValue = unserializableValue; |
| 401 if (unserializableValue === RuntimeAgent.UnserializableValue.Infinit
y || | 402 if (unserializableValue === RuntimeAgent.UnserializableValue.Infinit
y || |
| 402 unserializableValue === RuntimeAgent.UnserializableValue.Negativ
eInfinity || | 403 unserializableValue === RuntimeAgent.UnserializableValue.Negativ
eInfinity || |
| 403 unserializableValue === RuntimeAgent.UnserializableValue.Negativ
e0 || | 404 unserializableValue === RuntimeAgent.UnserializableValue.Negativ
e0 || |
| 404 unserializableValue === RuntimeAgent.UnserializableValue.NaN) { | 405 unserializableValue === RuntimeAgent.UnserializableValue.NaN) { |
| 405 this.value = Number(unserializableValue); | 406 this.value = Number(unserializableValue); |
| 406 } else { | 407 } else { |
| 407 this.value = unserializableValue; | 408 this.value = unserializableValue; |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1510 }, | 1511 }, |
| 1511 | 1512 |
| 1512 /** | 1513 /** |
| 1513 * @return {!WebInspector.RemoteObject} | 1514 * @return {!WebInspector.RemoteObject} |
| 1514 */ | 1515 */ |
| 1515 object: function() | 1516 object: function() |
| 1516 { | 1517 { |
| 1517 return this._object; | 1518 return this._object; |
| 1518 } | 1519 } |
| 1519 } | 1520 } |
| OLD | NEW |