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; |
220 if (script.target() === message.target() && script.scriptId === rawL
ocation.scriptId) | 222 if (script.target() === message.target() && script.scriptId === rawL
ocation.scriptId) |
221 this._addConsoleMessageToScript(message, rawLocation); | 223 this._addConsoleMessageToScript(message, rawLocation); |
222 else | 224 else |
223 pendingMessages.push(message); | 225 pendingMessages.push(message); |
224 } | 226 } |
225 | 227 |
226 if (pendingMessages.length) | 228 if (pendingMessages.length) |
227 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; | 229 this._pendingConsoleMessages[script.sourceURL] = pendingMessages; |
228 else | 230 else |
229 delete this._pendingConsoleMessages[script.sourceURL]; | 231 delete this._pendingConsoleMessages[script.sourceURL]; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 }, | 306 }, |
305 | 307 |
306 dispose: function() | 308 dispose: function() |
307 { | 309 { |
308 this._liveLocation.dispose(); | 310 this._liveLocation.dispose(); |
309 } | 311 } |
310 } | 312 } |
311 | 313 |
312 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ | 314 /** @type {!WebInspector.PresentationConsoleMessageHelper} */ |
313 WebInspector.presentationConsoleMessageHelper; | 315 WebInspector.presentationConsoleMessageHelper; |
OLD | NEW |