| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 addMessage: function(msg) | 125 addMessage: function(msg) |
| 126 { | 126 { |
| 127 // Don't add the message if there is no message or valid line or if the
msg isn't an error or warning. | 127 // Don't add the message if there is no message or valid line or if the
msg isn't an error or warning. |
| 128 if (!msg.message || msg.line <= 0 || !msg.isErrorOrWarning()) | 128 if (!msg.message || msg.line <= 0 || !msg.isErrorOrWarning()) |
| 129 return; | 129 return; |
| 130 this._messages.push(msg) | 130 this._messages.push(msg) |
| 131 if (this._textViewer) | 131 if (this._textViewer) |
| 132 this._addMessageToSource(msg); | 132 this._addMessageToSource(msg); |
| 133 }, | 133 }, |
| 134 | 134 |
| 135 addScript: function(script) | |
| 136 { | |
| 137 this._scripts[script.sourceID] = script; | |
| 138 }, | |
| 139 | |
| 140 clearMessages: function() | 135 clearMessages: function() |
| 141 { | 136 { |
| 142 for (var line in this._messageBubbles) { | 137 for (var line in this._messageBubbles) { |
| 143 var bubble = this._messageBubbles[line]; | 138 var bubble = this._messageBubbles[line]; |
| 144 bubble.parentNode.removeChild(bubble); | 139 bubble.parentNode.removeChild(bubble); |
| 145 } | 140 } |
| 146 | 141 |
| 147 this._messages = []; | 142 this._messages = []; |
| 148 this._rowMessages = {}; | 143 this._rowMessages = {}; |
| 149 this._messageBubbles = {}; | 144 this._messageBubbles = {}; |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 | 771 |
| 777 resize: function() | 772 resize: function() |
| 778 { | 773 { |
| 779 if (this._textViewer) | 774 if (this._textViewer) |
| 780 this._textViewer.resize(); | 775 this._textViewer.resize(); |
| 781 } | 776 } |
| 782 } | 777 } |
| 783 | 778 |
| 784 | 779 |
| 785 WebInspector.SourceFrame.prototype.__proto__ = WebInspector.Object.prototype; | 780 WebInspector.SourceFrame.prototype.__proto__ = WebInspector.Object.prototype; |
| OLD | NEW |