OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 /** | 32 /** |
33 * @constructor | 33 * @constructor |
34 * @extends {WebInspector.Object} | 34 * @extends {WebInspector.Object} |
| 35 * @param {!WebInspector.TimelineModel} model |
35 */ | 36 */ |
36 WebInspector.TimelinePresentationModel = function() | 37 WebInspector.TimelinePresentationModel = function(model) |
37 { | 38 { |
| 39 this._model = model; |
38 this._filters = []; | 40 this._filters = []; |
| 41 this._bindings = new WebInspector.TimelinePresentationModel.InterRecordBindi
ngs(); |
39 this.reset(); | 42 this.reset(); |
40 } | 43 } |
41 | 44 |
42 /** | 45 /** |
43 * @param {!Array.<*>} recordsArray | 46 * @param {!Array.<*>} recordsArray |
44 * @param {?function(*)|?function(*,number)} preOrderCallback | 47 * @param {?function(*)|?function(*,number)} preOrderCallback |
45 * @param {function(*)|function(*,number)=} postOrderCallback | 48 * @param {function(*)|function(*,number)=} postOrderCallback |
46 */ | 49 */ |
47 WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, pr
eOrderCallback, postOrderCallback) | 50 WebInspector.TimelinePresentationModel.forAllRecords = function(recordsArray, pr
eOrderCallback, postOrderCallback) |
48 { | 51 { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 /** | 110 /** |
108 * @return {!WebInspector.TimelinePresentationModel.Record} | 111 * @return {!WebInspector.TimelinePresentationModel.Record} |
109 */ | 112 */ |
110 rootRecord: function() | 113 rootRecord: function() |
111 { | 114 { |
112 return this._rootRecord; | 115 return this._rootRecord; |
113 }, | 116 }, |
114 | 117 |
115 reset: function() | 118 reset: function() |
116 { | 119 { |
117 this._rootRecord = new WebInspector.TimelinePresentationModel.Record(thi
s, { type: WebInspector.TimelineModel.RecordType.Root }, null); | 120 var rootPayload = { type: WebInspector.TimelineModel.RecordType.Root }; |
118 this._sendRequestRecords = {}; | 121 this._rootRecord = new WebInspector.TimelinePresentationModel.Record(thi
s._model, this._bindings, /** @type {!TimelineAgent.TimelineEvent} */ (rootPaylo
ad), null); |
119 this._timerRecords = {}; | |
120 this._requestAnimationFrameRecords = {}; | |
121 this._eventDividerRecords = []; | 122 this._eventDividerRecords = []; |
122 this._minimumRecordTime = -1; | 123 this._minimumRecordTime = -1; |
123 this._layoutInvalidateStack = {}; | |
124 this._lastScheduleStyleRecalculation = {}; | |
125 this._webSocketCreateRecords = {}; | |
126 this._coalescingBuckets = {}; | 124 this._coalescingBuckets = {}; |
127 this._mergingBuffer = new WebInspector.TimelineMergingRecordBuffer(); | 125 this._mergingBuffer = new WebInspector.TimelineMergingRecordBuffer(); |
128 | 126 |
129 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ | 127 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ |
130 this._mainThreadTasks = ([]); | 128 this._mainThreadTasks = ([]); |
131 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ | 129 /** @type {!Array.<!TimelineAgent.TimelineEvent>} */ |
132 this._gpuThreadTasks = ([]); | 130 this._gpuThreadTasks = ([]); |
| 131 |
| 132 this._bindings._reset(); |
133 }, | 133 }, |
134 | 134 |
135 /** | 135 /** |
136 * @return {number} | 136 * @return {number} |
137 */ | 137 */ |
138 minimumRecordTime: function() | 138 minimumRecordTime: function() |
139 { | 139 { |
140 return this._minimumRecordTime; | 140 return this._minimumRecordTime; |
141 }, | 141 }, |
142 | 142 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 // On main thread, only coalesce if the last event is of same type. | 214 // On main thread, only coalesce if the last event is of same type. |
215 if (parentRecord === this._rootRecord) | 215 if (parentRecord === this._rootRecord) |
216 coalescingBucket = record.thread ? record.type : "mainThread"; | 216 coalescingBucket = record.thread ? record.type : "mainThread"; |
217 var coalescedRecord = this._findCoalescedParent(record, parentRecord, co
alescingBucket); | 217 var coalescedRecord = this._findCoalescedParent(record, parentRecord, co
alescingBucket); |
218 if (coalescedRecord) | 218 if (coalescedRecord) |
219 parentRecord = coalescedRecord; | 219 parentRecord = coalescedRecord; |
220 | 220 |
221 if (WebInspector.TimelineUIUtils.isEventDivider(record)) | 221 if (WebInspector.TimelineUIUtils.isEventDivider(record)) |
222 this._eventDividerRecords.push(record); | 222 this._eventDividerRecords.push(record); |
223 | 223 |
224 var formattedRecord = new WebInspector.TimelinePresentationModel.Record(
this, record, parentRecord); | 224 var formattedRecord = new WebInspector.TimelinePresentationModel.Record(
this._model, this._bindings, record, parentRecord); |
225 if (record.type in WebInspector.TimelinePresentationModel._hiddenRecords
) { | 225 if (record.type in WebInspector.TimelinePresentationModel._hiddenRecords
) { |
226 parentRecord.children.pop(); | 226 parentRecord.children.pop(); |
227 return null; | 227 return null; |
228 } | 228 } |
229 | 229 |
230 formattedRecord.collapsed = parentRecord === this._rootRecord; | 230 formattedRecord.collapsed = parentRecord === this._rootRecord; |
231 if (coalescingBucket) | 231 if (coalescingBucket) |
232 this._coalescingBuckets[coalescingBucket] = formattedRecord; | 232 this._coalescingBuckets[coalescingBucket] = formattedRecord; |
233 | 233 |
234 for (var i = 0; record.children && i < record.children.length; ++i) | 234 for (var i = 0; record.children && i < record.children.length; ++i) |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 type: record._record.type, | 282 type: record._record.type, |
283 startTime: record._record.startTime, | 283 startTime: record._record.startTime, |
284 endTime: record._record.endTime, | 284 endTime: record._record.endTime, |
285 data: { } | 285 data: { } |
286 }; | 286 }; |
287 if (record._record.thread) | 287 if (record._record.thread) |
288 rawRecord.thread = "aggregated"; | 288 rawRecord.thread = "aggregated"; |
289 if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp) | 289 if (record.type === WebInspector.TimelineModel.RecordType.TimeStamp) |
290 rawRecord.data.message = record.data.message; | 290 rawRecord.data.message = record.data.message; |
291 | 291 |
292 var coalescedRecord = new WebInspector.TimelinePresentationModel.Record(
this, rawRecord, null); | 292 var coalescedRecord = new WebInspector.TimelinePresentationModel.Record(
this._model, this._bindings, rawRecord, null); |
293 var parent = record.parent; | 293 var parent = record.parent; |
294 | 294 |
295 coalescedRecord.coalesced = true; | 295 coalescedRecord.coalesced = true; |
296 coalescedRecord.collapsed = true; | 296 coalescedRecord.collapsed = true; |
297 coalescedRecord._children.push(record); | 297 coalescedRecord._children.push(record); |
298 record.parent = coalescedRecord; | 298 record.parent = coalescedRecord; |
299 if (record.hasWarnings() || record.childHasWarnings()) | 299 if (record.hasWarnings() || record.childHasWarnings()) |
300 coalescedRecord._childHasWarnings = true; | 300 coalescedRecord._childHasWarnings = true; |
301 | 301 |
302 coalescedRecord.parent = parent; | 302 coalescedRecord.parent = parent; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 return false; | 406 return false; |
407 } | 407 } |
408 return !this._searchFilter || this._searchFilter.accept(record); | 408 return !this._searchFilter || this._searchFilter.accept(record); |
409 }, | 409 }, |
410 | 410 |
411 __proto__: WebInspector.Object.prototype | 411 __proto__: WebInspector.Object.prototype |
412 } | 412 } |
413 | 413 |
414 /** | 414 /** |
415 * @constructor | 415 * @constructor |
416 * @param {!WebInspector.TimelinePresentationModel} presentationModel | 416 */ |
417 * @param {!Object} record | 417 WebInspector.TimelinePresentationModel.InterRecordBindings = function() |
| 418 { |
| 419 this._reset(); |
| 420 } |
| 421 |
| 422 WebInspector.TimelinePresentationModel.InterRecordBindings.prototype = { |
| 423 _reset: function() |
| 424 { |
| 425 this._sendRequestRecords = {}; |
| 426 this._timerRecords = {}; |
| 427 this._requestAnimationFrameRecords = {}; |
| 428 this._layoutInvalidateStack = {}; |
| 429 this._lastScheduleStyleRecalculation = {}; |
| 430 this._webSocketCreateRecords = {}; |
| 431 } |
| 432 } |
| 433 |
| 434 /** |
| 435 * @constructor |
| 436 * @param {!WebInspector.TimelineModel} model |
| 437 * @param {!WebInspector.TimelinePresentationModel.InterRecordBindings} bindings |
| 438 * @param {!TimelineAgent.TimelineEvent} record |
418 * @param {?WebInspector.TimelinePresentationModel.Record} parentRecord | 439 * @param {?WebInspector.TimelinePresentationModel.Record} parentRecord |
419 */ | 440 */ |
420 WebInspector.TimelinePresentationModel.Record = function(presentationModel, reco
rd, parentRecord) | 441 WebInspector.TimelinePresentationModel.Record = function(model, bindings, record
, parentRecord) |
421 { | 442 { |
422 this._presentationModel = presentationModel; | 443 this._model = model; |
423 this._aggregatedStats = {}; | 444 this._aggregatedStats = {}; |
424 this._record = /** @type {!TimelineAgent.TimelineEvent} */ (record); | 445 this._record = /** @type {!TimelineAgent.TimelineEvent} */ (record); |
425 this._children = []; | 446 this._children = []; |
426 if (parentRecord) { | 447 if (parentRecord) { |
427 this.parent = parentRecord; | 448 this.parent = parentRecord; |
428 parentRecord.children.push(this); | 449 parentRecord.children.push(this); |
429 } | 450 } |
430 | 451 |
431 this._selfTime = this.endTime - this.startTime; | 452 this._selfTime = this.endTime - this.startTime; |
432 this._lastChildEndTime = this.endTime; | 453 this._lastChildEndTime = this.endTime; |
433 this._startTimeOffset = this.startTime - presentationModel._minimumRecordTim
e; | 454 this._startTimeOffset = this.startTime - model.minimumRecordTime(); |
434 | 455 |
435 if (record.data) { | 456 if (record.data) { |
436 if (record.data["url"]) | 457 if (record.data["url"]) |
437 this.url = record.data["url"]; | 458 this.url = record.data["url"]; |
438 if (record.data["rootNode"]) | 459 if (record.data["rootNode"]) |
439 this._relatedBackendNodeId = record.data["rootNode"]; | 460 this._relatedBackendNodeId = record.data["rootNode"]; |
440 else if (record.data["elementId"]) | 461 else if (record.data["elementId"]) |
441 this._relatedBackendNodeId = record.data["elementId"]; | 462 this._relatedBackendNodeId = record.data["elementId"]; |
442 if (record.data["scriptName"]) { | 463 if (record.data["scriptName"]) { |
443 this.scriptName = record.data["scriptName"]; | 464 this.scriptName = record.data["scriptName"]; |
444 this.scriptLine = record.data["scriptLine"]; | 465 this.scriptLine = record.data["scriptLine"]; |
445 } | 466 } |
446 } | 467 } |
447 | 468 |
448 if (parentRecord && parentRecord.callSiteStackTrace) | 469 if (parentRecord && parentRecord.callSiteStackTrace) |
449 this.callSiteStackTrace = parentRecord.callSiteStackTrace; | 470 this.callSiteStackTrace = parentRecord.callSiteStackTrace; |
450 | 471 |
451 var recordTypes = WebInspector.TimelineModel.RecordType; | 472 var recordTypes = WebInspector.TimelineModel.RecordType; |
452 switch (record.type) { | 473 switch (record.type) { |
453 case recordTypes.ResourceSendRequest: | 474 case recordTypes.ResourceSendRequest: |
454 // Make resource receive record last since request was sent; make finish
record last since response received. | 475 // Make resource receive record last since request was sent; make finish
record last since response received. |
455 presentationModel._sendRequestRecords[record.data["requestId"]] = this; | 476 bindings._sendRequestRecords[record.data["requestId"]] = this; |
456 break; | 477 break; |
457 | 478 |
458 case recordTypes.ResourceReceiveResponse: | 479 case recordTypes.ResourceReceiveResponse: |
459 var sendRequestRecord = presentationModel._sendRequestRecords[record.dat
a["requestId"]]; | 480 var sendRequestRecord = bindings._sendRequestRecords[record.data["reques
tId"]]; |
460 if (sendRequestRecord) // False if we started instrumentation in the mid
dle of request. | 481 if (sendRequestRecord) // False if we started instrumentation in the mid
dle of request. |
461 this.url = sendRequestRecord.url; | 482 this.url = sendRequestRecord.url; |
462 break; | 483 break; |
463 | 484 |
464 case recordTypes.ResourceReceivedData: | 485 case recordTypes.ResourceReceivedData: |
465 case recordTypes.ResourceFinish: | 486 case recordTypes.ResourceFinish: |
466 var sendRequestRecord = presentationModel._sendRequestRecords[record.dat
a["requestId"]]; | 487 var sendRequestRecord = bindings._sendRequestRecords[record.data["reques
tId"]]; |
467 if (sendRequestRecord) // False for main resource. | 488 if (sendRequestRecord) // False for main resource. |
468 this.url = sendRequestRecord.url; | 489 this.url = sendRequestRecord.url; |
469 break; | 490 break; |
470 | 491 |
471 case recordTypes.TimerInstall: | 492 case recordTypes.TimerInstall: |
472 this.timeout = record.data["timeout"]; | 493 this.timeout = record.data["timeout"]; |
473 this.singleShot = record.data["singleShot"]; | 494 this.singleShot = record.data["singleShot"]; |
474 presentationModel._timerRecords[record.data["timerId"]] = this; | 495 bindings._timerRecords[record.data["timerId"]] = this; |
475 break; | 496 break; |
476 | 497 |
477 case recordTypes.TimerFire: | 498 case recordTypes.TimerFire: |
478 var timerInstalledRecord = presentationModel._timerRecords[record.data["
timerId"]]; | 499 var timerInstalledRecord = bindings._timerRecords[record.data["timerId"]
]; |
479 if (timerInstalledRecord) { | 500 if (timerInstalledRecord) { |
480 this.callSiteStackTrace = timerInstalledRecord.stackTrace; | 501 this.callSiteStackTrace = timerInstalledRecord.stackTrace; |
481 this.timeout = timerInstalledRecord.timeout; | 502 this.timeout = timerInstalledRecord.timeout; |
482 this.singleShot = timerInstalledRecord.singleShot; | 503 this.singleShot = timerInstalledRecord.singleShot; |
483 } | 504 } |
484 break; | 505 break; |
485 | 506 |
486 case recordTypes.RequestAnimationFrame: | 507 case recordTypes.RequestAnimationFrame: |
487 presentationModel._requestAnimationFrameRecords[record.data["id"]] = thi
s; | 508 bindings._requestAnimationFrameRecords[record.data["id"]] = this; |
488 break; | 509 break; |
489 | 510 |
490 case recordTypes.FireAnimationFrame: | 511 case recordTypes.FireAnimationFrame: |
491 var requestAnimationRecord = presentationModel._requestAnimationFrameRec
ords[record.data["id"]]; | 512 var requestAnimationRecord = bindings._requestAnimationFrameRecords[reco
rd.data["id"]]; |
492 if (requestAnimationRecord) | 513 if (requestAnimationRecord) |
493 this.callSiteStackTrace = requestAnimationRecord.stackTrace; | 514 this.callSiteStackTrace = requestAnimationRecord.stackTrace; |
494 break; | 515 break; |
495 | 516 |
496 case recordTypes.ConsoleTime: | 517 case recordTypes.ConsoleTime: |
497 var message = record.data["message"]; | 518 var message = record.data["message"]; |
498 break; | 519 break; |
499 | 520 |
500 case recordTypes.ScheduleStyleRecalculation: | 521 case recordTypes.ScheduleStyleRecalculation: |
501 presentationModel._lastScheduleStyleRecalculation[this.frameId] = this; | 522 bindings._lastScheduleStyleRecalculation[this.frameId] = this; |
502 break; | 523 break; |
503 | 524 |
504 case recordTypes.RecalculateStyles: | 525 case recordTypes.RecalculateStyles: |
505 var scheduleStyleRecalculationRecord = presentationModel._lastScheduleSt
yleRecalculation[this.frameId]; | 526 var scheduleStyleRecalculationRecord = bindings._lastScheduleStyleRecalc
ulation[this.frameId]; |
506 if (!scheduleStyleRecalculationRecord) | 527 if (!scheduleStyleRecalculationRecord) |
507 break; | 528 break; |
508 this.callSiteStackTrace = scheduleStyleRecalculationRecord.stackTrace; | 529 this.callSiteStackTrace = scheduleStyleRecalculationRecord.stackTrace; |
509 break; | 530 break; |
510 | 531 |
511 case recordTypes.InvalidateLayout: | 532 case recordTypes.InvalidateLayout: |
512 // Consider style recalculation as a reason for layout invalidation, | 533 // Consider style recalculation as a reason for layout invalidation, |
513 // but only if we had no earlier layout invalidation records. | 534 // but only if we had no earlier layout invalidation records. |
514 var styleRecalcStack; | 535 var styleRecalcStack; |
515 if (!presentationModel._layoutInvalidateStack[this.frameId]) { | 536 if (!bindings._layoutInvalidateStack[this.frameId]) { |
516 for (var outerRecord = parentRecord; outerRecord; outerRecord = reco
rd.parent) { | 537 if (parentRecord.type === recordTypes.RecalculateStyles) |
517 if (outerRecord.type === recordTypes.RecalculateStyles) { | 538 styleRecalcStack = parentRecord.callSiteStackTrace; |
518 styleRecalcStack = outerRecord.callSiteStackTrace; | |
519 break; | |
520 } | |
521 } | |
522 } | 539 } |
523 presentationModel._layoutInvalidateStack[this.frameId] = styleRecalcStac
k || this.stackTrace; | 540 bindings._layoutInvalidateStack[this.frameId] = styleRecalcStack || this
.stackTrace; |
524 break; | 541 break; |
525 | 542 |
526 case recordTypes.Layout: | 543 case recordTypes.Layout: |
527 var layoutInvalidateStack = presentationModel._layoutInvalidateStack[thi
s.frameId]; | 544 var layoutInvalidateStack = bindings._layoutInvalidateStack[this.frameId
]; |
528 if (layoutInvalidateStack) | 545 if (layoutInvalidateStack) |
529 this.callSiteStackTrace = layoutInvalidateStack; | 546 this.callSiteStackTrace = layoutInvalidateStack; |
530 if (this.stackTrace) | 547 if (this.stackTrace) |
531 this.addWarning(WebInspector.UIString("Forced synchronous layout is
a possible performance bottleneck.")); | 548 this.addWarning(WebInspector.UIString("Forced synchronous layout is
a possible performance bottleneck.")); |
532 | 549 |
533 presentationModel._layoutInvalidateStack[this.frameId] = null; | 550 bindings._layoutInvalidateStack[this.frameId] = null; |
534 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); | 551 this.highlightQuad = record.data.root || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); |
535 this._relatedBackendNodeId = record.data["rootNode"]; | 552 this._relatedBackendNodeId = record.data["rootNode"]; |
536 break; | 553 break; |
537 | 554 |
538 case recordTypes.AutosizeText: | 555 case recordTypes.AutosizeText: |
539 if (record.data.needsRelayout && parentRecord.type === recordTypes.Layou
t) | 556 if (record.data.needsRelayout && parentRecord.type === recordTypes.Layou
t) |
540 parentRecord.addWarning(WebInspector.UIString("Layout required two p
asses due to text autosizing, consider setting viewport.")); | 557 parentRecord.addWarning(WebInspector.UIString("Layout required two p
asses due to text autosizing, consider setting viewport.")); |
541 break; | 558 break; |
542 | 559 |
543 case recordTypes.Paint: | 560 case recordTypes.Paint: |
544 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); | 561 this.highlightQuad = record.data.clip || WebInspector.TimelinePresentati
onModel.quadFromRectData(record.data); |
545 break; | 562 break; |
546 | 563 |
547 case recordTypes.WebSocketCreate: | 564 case recordTypes.WebSocketCreate: |
548 this.webSocketURL = record.data["url"]; | 565 this.webSocketURL = record.data["url"]; |
549 if (typeof record.data["webSocketProtocol"] !== "undefined") | 566 if (typeof record.data["webSocketProtocol"] !== "undefined") |
550 this.webSocketProtocol = record.data["webSocketProtocol"]; | 567 this.webSocketProtocol = record.data["webSocketProtocol"]; |
551 presentationModel._webSocketCreateRecords[record.data["identifier"]] = t
his; | 568 bindings._webSocketCreateRecords[record.data["identifier"]] = this; |
552 break; | 569 break; |
553 | 570 |
554 case recordTypes.WebSocketSendHandshakeRequest: | 571 case recordTypes.WebSocketSendHandshakeRequest: |
555 case recordTypes.WebSocketReceiveHandshakeResponse: | 572 case recordTypes.WebSocketReceiveHandshakeResponse: |
556 case recordTypes.WebSocketDestroy: | 573 case recordTypes.WebSocketDestroy: |
557 var webSocketCreateRecord = presentationModel._webSocketCreateRecords[re
cord.data["identifier"]]; | 574 var webSocketCreateRecord = bindings._webSocketCreateRecords[record.data
["identifier"]]; |
558 if (webSocketCreateRecord) { // False if we started instrumentation in t
he middle of request. | 575 if (webSocketCreateRecord) { // False if we started instrumentation in t
he middle of request. |
559 this.webSocketURL = webSocketCreateRecord.webSocketURL; | 576 this.webSocketURL = webSocketCreateRecord.webSocketURL; |
560 if (typeof webSocketCreateRecord.webSocketProtocol !== "undefined") | 577 if (typeof webSocketCreateRecord.webSocketProtocol !== "undefined") |
561 this.webSocketProtocol = webSocketCreateRecord.webSocketProtocol
; | 578 this.webSocketProtocol = webSocketCreateRecord.webSocketProtocol
; |
562 } | 579 } |
563 break; | 580 break; |
564 | 581 |
565 case recordTypes.EmbedderCallback: | 582 case recordTypes.EmbedderCallback: |
566 this.embedderCallbackName = record.data["callbackName"]; | 583 this.embedderCallbackName = record.data["callbackName"]; |
567 break; | 584 break; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
627 get category() | 644 get category() |
628 { | 645 { |
629 return WebInspector.TimelineUIUtils.categoryForRecord(this._record); | 646 return WebInspector.TimelineUIUtils.categoryForRecord(this._record); |
630 }, | 647 }, |
631 | 648 |
632 /** | 649 /** |
633 * @return {string} | 650 * @return {string} |
634 */ | 651 */ |
635 title: function() | 652 title: function() |
636 { | 653 { |
637 return WebInspector.TimelineUIUtils.recordTitle(this._presentationModel,
this._record); | 654 return WebInspector.TimelineUIUtils.recordTitle(this._model, this._recor
d); |
638 }, | 655 }, |
639 | 656 |
640 /** | 657 /** |
641 * @return {number} | 658 * @return {number} |
642 */ | 659 */ |
643 get startTime() | 660 get startTime() |
644 { | 661 { |
645 return this._record.startTime; | 662 return this._record.startTime; |
646 }, | 663 }, |
647 | 664 |
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1199 { | 1216 { |
1200 } | 1217 } |
1201 | 1218 |
1202 WebInspector.TimelinePresentationModel.Filter.prototype = { | 1219 WebInspector.TimelinePresentationModel.Filter.prototype = { |
1203 /** | 1220 /** |
1204 * @param {!WebInspector.TimelinePresentationModel.Record} record | 1221 * @param {!WebInspector.TimelinePresentationModel.Record} record |
1205 * @return {boolean} | 1222 * @return {boolean} |
1206 */ | 1223 */ |
1207 accept: function(record) { return false; } | 1224 accept: function(record) { return false; } |
1208 } | 1225 } |
OLD | NEW |