| 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 var script = /** @type {!WebInspector.Script} */ (event.data); | 129 var script = /** @type {!WebInspector.Script} */ (event.data); |
| 130 | 130 |
| 131 var messages = this._pendingConsoleMessages[script.sourceURL]; | 131 var messages = this._pendingConsoleMessages[script.sourceURL]; |
| 132 if (!messages) | 132 if (!messages) |
| 133 return; | 133 return; |
| 134 | 134 |
| 135 var pendingMessages = []; | 135 var pendingMessages = []; |
| 136 for (var i = 0; i < messages.length; i++) { | 136 for (var i = 0; i < messages.length; i++) { |
| 137 var message = messages[i]; | 137 var message = messages[i]; |
| 138 var rawLocation = this._rawLocation(message); | 138 var rawLocation = this._rawLocation(message); |
| 139 if (script.scriptId === rawLocation.scriptId) | 139 if (script.target() === message.target() && script.scriptId === rawL
ocation.scriptId) |
| 140 this._addConsoleMessageToScript(message, rawLocation); | 140 this._addConsoleMessageToScript(message, rawLocation); |
| 141 else | 141 else |
| 142 pendingMessages.push(message); | 142 pendingMessages.push(message); |
| 143 } | 143 } |
| 144 | 144 |
| 145 if (pendingMessages.length) | 145 if (pendingMessages.length) |
| 146 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; | 146 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; |
| 147 else | 147 else |
| 148 delete this._pendingConsoleMessages[script.sourceURL]; | 148 delete this._pendingConsoleMessages[script.sourceURL]; |
| 149 }, | 149 }, |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 get lineNumber() | 192 get lineNumber() |
| 193 { | 193 { |
| 194 return this._uiLocation.lineNumber; | 194 return this._uiLocation.lineNumber; |
| 195 }, | 195 }, |
| 196 | 196 |
| 197 dispose: function() | 197 dispose: function() |
| 198 { | 198 { |
| 199 this._liveLocation.dispose(); | 199 this._liveLocation.dispose(); |
| 200 } | 200 } |
| 201 } | 201 } |
| OLD | NEW |