Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Joseph Pecoraro | 4 * Copyright (C) 2009 Joseph Pecoraro |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 731 * @param {?WebInspector.RemoteObject} result | 731 * @param {?WebInspector.RemoteObject} result |
| 732 * @param {boolean=} wasThrown | 732 * @param {boolean=} wasThrown |
| 733 * @this {WebInspector.ConsoleViewMessage} | 733 * @this {WebInspector.ConsoleViewMessage} |
| 734 */ | 734 */ |
| 735 function onInvokeGetterClick(result, wasThrown) | 735 function onInvokeGetterClick(result, wasThrown) |
| 736 { | 736 { |
| 737 if (!result) | 737 if (!result) |
| 738 return; | 738 return; |
| 739 rootElement.removeChildren(); | 739 rootElement.removeChildren(); |
| 740 if (wasThrown) { | 740 if (wasThrown) { |
| 741 var element = rootElement.createChild("span", "error-message"); | 741 var element = rootElement.createChild("span"); |
|
lushnikov
2016/09/20 17:58:28
why remove the red color? it is helpful
dgozman
2016/09/20 18:11:13
I wasn't able to trigger this code. It's a part of
| |
| 742 element.textContent = WebInspector.UIString("<exception>"); | 742 element.textContent = WebInspector.UIString("<exception>"); |
| 743 element.title = /** @type {string} */ (result.description); | 743 element.title = /** @type {string} */ (result.description); |
| 744 } else if (isArrayEntry) { | 744 } else if (isArrayEntry) { |
| 745 rootElement.appendChild(this._formatAsArrayEntry(result)); | 745 rootElement.appendChild(this._formatAsArrayEntry(result)); |
| 746 } else { | 746 } else { |
| 747 // Make a PropertyPreview from the RemoteObject similar to the b ackend logic. | 747 // Make a PropertyPreview from the RemoteObject similar to the b ackend logic. |
| 748 const maxLength = 100; | 748 const maxLength = 100; |
| 749 var type = result.type; | 749 var type = result.type; |
| 750 var subtype = result.subtype; | 750 var subtype = result.subtype; |
| 751 var description = ""; | 751 var description = ""; |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1353 { | 1353 { |
| 1354 if (!this._wrapperElement) { | 1354 if (!this._wrapperElement) { |
| 1355 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); | 1355 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); |
| 1356 this._wrapperElement.classList.toggle("collapsed", this._collapsed); | 1356 this._wrapperElement.classList.toggle("collapsed", this._collapsed); |
| 1357 } | 1357 } |
| 1358 return this._wrapperElement; | 1358 return this._wrapperElement; |
| 1359 }, | 1359 }, |
| 1360 | 1360 |
| 1361 __proto__: WebInspector.ConsoleViewMessage.prototype | 1361 __proto__: WebInspector.ConsoleViewMessage.prototype |
| 1362 } | 1362 } |
| OLD | NEW |