| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 }, | 72 }, |
| 73 | 73 |
| 74 /** | 74 /** |
| 75 * @param {!WebInspector.ConsoleMessage} msg | 75 * @param {!WebInspector.ConsoleMessage} msg |
| 76 */ | 76 */ |
| 77 addMessage: function(msg) | 77 addMessage: function(msg) |
| 78 { | 78 { |
| 79 if (this._isBlacklisted(msg)) | 79 if (this._isBlacklisted(msg)) |
| 80 return; | 80 return; |
| 81 | 81 |
| 82 if (msg.source === WebInspector.ConsoleMessage.MessageSource.Worker && m
sg.target().workerManager && msg.target().workerManager.targetByWorkerId(msg.wor
kerId)) |
| 83 return; |
| 84 |
| 82 if (msg.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError
&& msg._revokedExceptionId) { | 85 if (msg.level === WebInspector.ConsoleMessage.MessageLevel.RevokedError
&& msg._revokedExceptionId) { |
| 83 var exceptionMessage = this._messageByExceptionId.get(msg._revokedEx
ceptionId); | 86 var exceptionMessage = this._messageByExceptionId.get(msg._revokedEx
ceptionId); |
| 84 if (!exceptionMessage) | 87 if (!exceptionMessage) |
| 85 return; | 88 return; |
| 86 this._errors--; | 89 this._errors--; |
| 87 this._revokedErrors++; | 90 this._revokedErrors++; |
| 88 exceptionMessage.level = WebInspector.ConsoleMessage.MessageLevel.Re
vokedError; | 91 exceptionMessage.level = WebInspector.ConsoleMessage.MessageLevel.Re
vokedError; |
| 89 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.Messa
geUpdated, exceptionMessage); | 92 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.Messa
geUpdated, exceptionMessage); |
| 90 return; | 93 return; |
| 91 } | 94 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 * @param {string=} type | 240 * @param {string=} type |
| 238 * @param {?string=} url | 241 * @param {?string=} url |
| 239 * @param {number=} line | 242 * @param {number=} line |
| 240 * @param {number=} column | 243 * @param {number=} column |
| 241 * @param {!NetworkAgent.RequestId=} requestId | 244 * @param {!NetworkAgent.RequestId=} requestId |
| 242 * @param {!Array.<!RuntimeAgent.RemoteObject>=} parameters | 245 * @param {!Array.<!RuntimeAgent.RemoteObject>=} parameters |
| 243 * @param {!RuntimeAgent.StackTrace=} stackTrace | 246 * @param {!RuntimeAgent.StackTrace=} stackTrace |
| 244 * @param {number=} timestamp | 247 * @param {number=} timestamp |
| 245 * @param {!RuntimeAgent.ExecutionContextId=} executionContextId | 248 * @param {!RuntimeAgent.ExecutionContextId=} executionContextId |
| 246 * @param {?string=} scriptId | 249 * @param {?string=} scriptId |
| 250 * @param {?string=} workerId |
| 247 */ | 251 */ |
| 248 WebInspector.ConsoleMessage = function(target, source, level, messageText, type,
url, line, column, requestId, parameters, stackTrace, timestamp, executionConte
xtId, scriptId) | 252 WebInspector.ConsoleMessage = function(target, source, level, messageText, type,
url, line, column, requestId, parameters, stackTrace, timestamp, executionConte
xtId, scriptId, workerId) |
| 249 { | 253 { |
| 250 this._target = target; | 254 this._target = target; |
| 251 this.source = source; | 255 this.source = source; |
| 252 this.level = level; | 256 this.level = level; |
| 253 this.messageText = messageText; | 257 this.messageText = messageText; |
| 254 this.type = type || WebInspector.ConsoleMessage.MessageType.Log; | 258 this.type = type || WebInspector.ConsoleMessage.MessageType.Log; |
| 255 /** @type {string|undefined} */ | 259 /** @type {string|undefined} */ |
| 256 this.url = url || undefined; | 260 this.url = url || undefined; |
| 257 /** @type {number} */ | 261 /** @type {number} */ |
| 258 this.line = line || 0; | 262 this.line = line || 0; |
| 259 /** @type {number} */ | 263 /** @type {number} */ |
| 260 this.column = column || 0; | 264 this.column = column || 0; |
| 261 this.parameters = parameters; | 265 this.parameters = parameters; |
| 262 /** @type {!RuntimeAgent.StackTrace|undefined} */ | 266 /** @type {!RuntimeAgent.StackTrace|undefined} */ |
| 263 this.stackTrace = stackTrace; | 267 this.stackTrace = stackTrace; |
| 264 this.timestamp = timestamp || Date.now(); | 268 this.timestamp = timestamp || Date.now(); |
| 265 this.executionContextId = executionContextId || 0; | 269 this.executionContextId = executionContextId || 0; |
| 266 this.scriptId = scriptId || null; | 270 this.scriptId = scriptId || null; |
| 271 this.workerId = workerId || null; |
| 267 | 272 |
| 268 var networkLog = target && WebInspector.NetworkLog.fromTarget(target); | 273 var networkLog = target && WebInspector.NetworkLog.fromTarget(target); |
| 269 this.request = (requestId && networkLog) ? networkLog.requestForId(requestId
) : null; | 274 this.request = (requestId && networkLog) ? networkLog.requestForId(requestId
) : null; |
| 270 | 275 |
| 271 if (this.request) { | 276 if (this.request) { |
| 272 var initiator = this.request.initiator(); | 277 var initiator = this.request.initiator(); |
| 273 if (initiator) { | 278 if (initiator) { |
| 274 this.stackTrace = initiator.stack || undefined; | 279 this.stackTrace = initiator.stack || undefined; |
| 275 if (initiator.url) { | 280 if (initiator.url) { |
| 276 this.url = initiator.url; | 281 this.url = initiator.url; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 XML: "xml", | 436 XML: "xml", |
| 432 JS: "javascript", | 437 JS: "javascript", |
| 433 Network: "network", | 438 Network: "network", |
| 434 ConsoleAPI: "console-api", | 439 ConsoleAPI: "console-api", |
| 435 Storage: "storage", | 440 Storage: "storage", |
| 436 AppCache: "appcache", | 441 AppCache: "appcache", |
| 437 Rendering: "rendering", | 442 Rendering: "rendering", |
| 438 CSS: "css", | 443 CSS: "css", |
| 439 Security: "security", | 444 Security: "security", |
| 440 Other: "other", | 445 Other: "other", |
| 441 Deprecation: "deprecation" | 446 Deprecation: "deprecation", |
| 447 Worker: "worker" |
| 442 } | 448 } |
| 443 | 449 |
| 444 /** | 450 /** |
| 445 * @enum {string} | 451 * @enum {string} |
| 446 */ | 452 */ |
| 447 WebInspector.ConsoleMessage.MessageType = { | 453 WebInspector.ConsoleMessage.MessageType = { |
| 448 Log: "log", | 454 Log: "log", |
| 449 Dir: "dir", | 455 Dir: "dir", |
| 450 DirXML: "dirxml", | 456 DirXML: "dirxml", |
| 451 Table: "table", | 457 Table: "table", |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 payload.text, | 513 payload.text, |
| 508 payload.type, | 514 payload.type, |
| 509 payload.url, | 515 payload.url, |
| 510 payload.line, | 516 payload.line, |
| 511 payload.column, | 517 payload.column, |
| 512 payload.networkRequestId, | 518 payload.networkRequestId, |
| 513 payload.parameters, | 519 payload.parameters, |
| 514 payload.stack, | 520 payload.stack, |
| 515 payload.timestamp * 1000, // Convert to ms. | 521 payload.timestamp * 1000, // Convert to ms. |
| 516 payload.executionContextId, | 522 payload.executionContextId, |
| 517 payload.scriptId); | 523 payload.scriptId, |
| 524 payload.workerId); |
| 518 this._console.addMessage(consoleMessage); | 525 this._console.addMessage(consoleMessage); |
| 519 }, | 526 }, |
| 520 | 527 |
| 521 /** | 528 /** |
| 522 * @override | 529 * @override |
| 523 * @param {number} count | 530 * @param {number} count |
| 524 */ | 531 */ |
| 525 messageRepeatCountUpdated: function(count) | 532 messageRepeatCountUpdated: function(count) |
| 526 { | 533 { |
| 527 }, | 534 }, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); | 622 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); |
| 616 }, | 623 }, |
| 617 | 624 |
| 618 __proto__: WebInspector.Object.prototype | 625 __proto__: WebInspector.Object.prototype |
| 619 } | 626 } |
| 620 | 627 |
| 621 /** | 628 /** |
| 622 * @type {!WebInspector.MultitargetConsoleModel} | 629 * @type {!WebInspector.MultitargetConsoleModel} |
| 623 */ | 630 */ |
| 624 WebInspector.multitargetConsoleModel; | 631 WebInspector.multitargetConsoleModel; |
| OLD | NEW |