OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 * @param {string} messageText | 201 * @param {string} messageText |
202 * @param {string=} type | 202 * @param {string=} type |
203 * @param {?string=} url | 203 * @param {?string=} url |
204 * @param {number=} line | 204 * @param {number=} line |
205 * @param {number=} column | 205 * @param {number=} column |
206 * @param {!NetworkAgent.RequestId=} requestId | 206 * @param {!NetworkAgent.RequestId=} requestId |
207 * @param {!Array.<!RuntimeAgent.RemoteObject>=} parameters | 207 * @param {!Array.<!RuntimeAgent.RemoteObject>=} parameters |
208 * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace | 208 * @param {!Array.<!ConsoleAgent.CallFrame>=} stackTrace |
209 * @param {number=} timestamp | 209 * @param {number=} timestamp |
210 * @param {boolean=} isOutdated | 210 * @param {boolean=} isOutdated |
| 211 * @param {!RuntimeAgent.ExecutionContextId=} executionContextId |
211 */ | 212 */ |
212 | 213 |
213 WebInspector.ConsoleMessage = function(source, level, messageText, type, url, li
ne, column, requestId, parameters, stackTrace, timestamp, isOutdated) | 214 WebInspector.ConsoleMessage = function(source, level, messageText, type, url, li
ne, column, requestId, parameters, stackTrace, timestamp, isOutdated, executionC
ontextId) |
214 { | 215 { |
215 this.source = source; | 216 this.source = source; |
216 this.level = level; | 217 this.level = level; |
217 this.messageText = messageText; | 218 this.messageText = messageText; |
218 this.type = type || WebInspector.ConsoleMessage.MessageType.Log; | 219 this.type = type || WebInspector.ConsoleMessage.MessageType.Log; |
219 this.url = url || null; | 220 this.url = url || null; |
220 this.line = line || 0; | 221 this.line = line || 0; |
221 this.column = column || 0; | 222 this.column = column || 0; |
222 this.parameters = parameters; | 223 this.parameters = parameters; |
223 this.stackTrace = stackTrace; | 224 this.stackTrace = stackTrace; |
224 this.timestamp = timestamp || Date.now(); | 225 this.timestamp = timestamp || Date.now(); |
225 this.isOutdated = isOutdated; | 226 this.isOutdated = isOutdated; |
| 227 this.executionContextId = executionContextId; |
226 | 228 |
227 this.request = requestId ? WebInspector.networkLog.requestForId(requestId) :
null; | 229 this.request = requestId ? WebInspector.networkLog.requestForId(requestId) :
null; |
228 } | 230 } |
229 | 231 |
230 WebInspector.ConsoleMessage.prototype = { | 232 WebInspector.ConsoleMessage.prototype = { |
231 | 233 |
232 /** | 234 /** |
233 * @return {boolean} | 235 * @return {boolean} |
234 */ | 236 */ |
235 isGroupMessage: function() | 237 isGroupMessage: function() |
(...skipping 21 matching lines...) Expand all Loading... |
257 this.level, | 259 this.level, |
258 this.messageText, | 260 this.messageText, |
259 this.type, | 261 this.type, |
260 this.url, | 262 this.url, |
261 this.line, | 263 this.line, |
262 this.column, | 264 this.column, |
263 this.request ? this.request.requestId : undefined, | 265 this.request ? this.request.requestId : undefined, |
264 this.parameters, | 266 this.parameters, |
265 this.stackTrace, | 267 this.stackTrace, |
266 this.timestamp, | 268 this.timestamp, |
267 this.isOutdated); | 269 this.isOutdated, |
| 270 this.executionContextId); |
268 }, | 271 }, |
269 | 272 |
270 /** | 273 /** |
271 * @param {?WebInspector.ConsoleMessage} msg | 274 * @param {?WebInspector.ConsoleMessage} msg |
272 * @return {boolean} | 275 * @return {boolean} |
273 */ | 276 */ |
274 isEqual: function(msg) | 277 isEqual: function(msg) |
275 { | 278 { |
276 if (!msg || WebInspector.settings.consoleTimestampsEnabled.get()) | 279 if (!msg || WebInspector.settings.consoleTimestampsEnabled.get()) |
277 return false; | 280 return false; |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 payload.level, | 383 payload.level, |
381 payload.text, | 384 payload.text, |
382 payload.type, | 385 payload.type, |
383 payload.url, | 386 payload.url, |
384 payload.line, | 387 payload.line, |
385 payload.column, | 388 payload.column, |
386 payload.networkRequestId, | 389 payload.networkRequestId, |
387 payload.parameters, | 390 payload.parameters, |
388 payload.stackTrace, | 391 payload.stackTrace, |
389 payload.timestamp * 1000, // Convert to ms. | 392 payload.timestamp * 1000, // Convert to ms. |
390 this._console._enablingConsole); | 393 this._console._enablingConsole, |
| 394 payload.executionContextId); |
391 this._console.addMessage(consoleMessage, true); | 395 this._console.addMessage(consoleMessage, true); |
392 }, | 396 }, |
393 | 397 |
394 /** | 398 /** |
395 * @param {number} count | 399 * @param {number} count |
396 */ | 400 */ |
397 messageRepeatCountUpdated: function(count) | 401 messageRepeatCountUpdated: function(count) |
398 { | 402 { |
399 }, | 403 }, |
400 | 404 |
401 messagesCleared: function() | 405 messagesCleared: function() |
402 { | 406 { |
403 if (!WebInspector.settings.preserveConsoleLog.get()) | 407 if (!WebInspector.settings.preserveConsoleLog.get()) |
404 this._console.clearMessages(); | 408 this._console.clearMessages(); |
405 } | 409 } |
406 } | 410 } |
407 | 411 |
408 /** | 412 /** |
409 * @type {!WebInspector.ConsoleModel} | 413 * @type {!WebInspector.ConsoleModel} |
410 */ | 414 */ |
411 WebInspector.console; | 415 WebInspector.console; |
OLD | NEW |