| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 var script = /** @type {!WebInspector.Script} */ (event.data); | 210 var script = /** @type {!WebInspector.Script} */ (event.data); |
| 211 | 211 |
| 212 var messages = this._pendingConsoleMessages[script.sourceURL]; | 212 var messages = this._pendingConsoleMessages[script.sourceURL]; |
| 213 if (!messages) | 213 if (!messages) |
| 214 return; | 214 return; |
| 215 | 215 |
| 216 var pendingMessages = []; | 216 var pendingMessages = []; |
| 217 for (var i = 0; i < messages.length; i++) { | 217 for (var i = 0; i < messages.length; i++) { |
| 218 var message = messages[i]; | 218 var message = messages[i]; |
| 219 var rawLocation = this._rawLocation(message); | 219 var rawLocation = this._rawLocation(message); |
| 220 if (!rawLocation) | |
| 221 continue; | |
| 222 if (script.target() === message.target() && script.scriptId === rawL
ocation.scriptId) | 220 if (script.target() === message.target() && script.scriptId === rawL
ocation.scriptId) |
| 223 this._addConsoleMessageToScript(message, rawLocation); | 221 this._addConsoleMessageToScript(message, rawLocation); |
| 224 else | 222 else |
| 225 pendingMessages.push(message); | 223 pendingMessages.push(message); |
| 226 } | 224 } |
| 227 | 225 |
| 228 if (pendingMessages.length) | 226 if (pendingMessages.length) |
| 229 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; | 227 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; |
| 230 else | 228 else |
| 231 delete this._pendingConsoleMessages[script.sourceURL]; | 229 delete this._pendingConsoleMessages[script.sourceURL]; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 }, | 304 }, |
| 307 | 305 |
| 308 dispose: function() | 306 dispose: function() |
| 309 { | 307 { |
| 310 this._liveLocation.dispose(); | 308 this._liveLocation.dispose(); |
| 311 } | 309 } |
| 312 } | 310 } |
| 313 | 311 |
| 314 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ | 312 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ |
| 315 WebInspector.presentationConsoleMessageHelper; | 313 WebInspector.presentationConsoleMessageHelper; |
| OLD | NEW |