 Chromium Code Reviews
 Chromium Code Reviews Issue 1624783002:
  DevTools: Switch to using fast stack iterator to collect stacks during timeline recording.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1624783002:
  DevTools: Switch to using fast stack iterator to collect stacks during timeline recording.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 var initialize_Timeline = function() { | 1 var initialize_Timeline = function() { | 
| 2 | 2 | 
| 3 InspectorTest.preloadPanel("timeline"); | 3 InspectorTest.preloadPanel("timeline"); | 
| 4 WebInspector.TempFile = InspectorTest.TempFileMock; | 4 WebInspector.TempFile = InspectorTest.TempFileMock; | 
| 5 | 5 | 
| 6 // Scrub values when printing out these properties in the record or data field. | 6 // Scrub values when printing out these properties in the record or data field. | 
| 7 InspectorTest.timelinePropertyFormatters = { | 7 InspectorTest.timelinePropertyFormatters = { | 
| 8 children: "formatAsTypeName", | 8 children: "formatAsTypeName", | 
| 9 endTime: "formatAsTypeName", | 9 endTime: "formatAsTypeName", | 
| 10 requestId: "formatAsTypeName", | 10 requestId: "formatAsTypeName", | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 64 InspectorTest.timelineModel = function() | 64 InspectorTest.timelineModel = function() | 
| 65 { | 65 { | 
| 66 return WebInspector.panels.timeline._model; | 66 return WebInspector.panels.timeline._model; | 
| 67 } | 67 } | 
| 68 | 68 | 
| 69 InspectorTest.timelineFrameModel = function() | 69 InspectorTest.timelineFrameModel = function() | 
| 70 { | 70 { | 
| 71 return WebInspector.panels.timeline._frameModel; | 71 return WebInspector.panels.timeline._frameModel; | 
| 72 } | 72 } | 
| 73 | 73 | 
| 74 InspectorTest.startTimeline = function(callback) | 74 InspectorTest.startTimeline = function(callback, disableSampling) | 
| 
caseq
2016/01/26 01:22:04
callback should always be last.
 
alph
2016/01/26 02:04:51
Acknowledged.
 | |
| 75 { | 75 { | 
| 76 var panel = WebInspector.panels.timeline; | 76 var panel = WebInspector.panels.timeline; | 
| 77 function onRecordingStarted() | 77 function onRecordingStarted() | 
| 78 { | 78 { | 
| 79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStarted, onRecordingStarted, this) | 79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStarted, onRecordingStarted, this); | 
| 80 callback(); | 80 callback(); | 
| 81 } | 81 } | 
| 82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta rted, onRecordingStarted, this) | 82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta rted, onRecordingStarted, this); | 
| 83 panel._captureJSProfileSetting.set(false); | 83 panel._captureJSProfileSetting.set(!disableSampling); | 
| 84 panel._toggleRecording(); | 84 panel._toggleRecording(); | 
| 85 }; | 85 }; | 
| 86 | 86 | 
| 87 InspectorTest.stopTimeline = function(callback) | 87 InspectorTest.stopTimeline = function(callback) | 
| 88 { | 88 { | 
| 89 var panel = WebInspector.panels.timeline; | 89 var panel = WebInspector.panels.timeline; | 
| 90 function didStop() | 90 function didStop() | 
| 91 { | 91 { | 
| 92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this) | 92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this) | 
| 93 InspectorTest.runAfterPendingDispatches(callback); | 93 InspectorTest.runAfterPendingDispatches(callback); | 
| 94 } | 94 } | 
| 95 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSto pped, didStop, this) | 95 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSto pped, didStop, this) | 
| 96 panel._toggleRecording(); | 96 panel._toggleRecording(); | 
| 97 }; | 97 }; | 
| 98 | 98 | 
| 99 InspectorTest.evaluateWithTimeline = function(actions, doneCallback) | 99 InspectorTest.evaluateWithTimeline = function(actions, doneCallback, disableSamp ling) | 
| 100 { | 100 { | 
| 101 InspectorTest.startTimeline(step1); | 101 InspectorTest.startTimeline(step1, disableSampling); | 
| 102 function step1() | 102 function step1() | 
| 103 { | 103 { | 
| 104 InspectorTest.evaluateInPage(actions, step2); | 104 InspectorTest.evaluateInPage(actions, step2); | 
| 105 } | 105 } | 
| 106 | 106 | 
| 107 function step2() | 107 function step2() | 
| 108 { | 108 { | 
| 109 InspectorTest.stopTimeline(doneCallback); | 109 InspectorTest.stopTimeline(doneCallback); | 
| 110 } | 110 } | 
| 111 } | 111 } | 
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 399 if (!--count) { | 399 if (!--count) { | 
| 400 callback(); | 400 callback(); | 
| 401 return; | 401 return; | 
| 402 } | 402 } | 
| 403 if (window.testRunner) | 403 if (window.testRunner) | 
| 404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame)); | 404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame)); | 
| 405 else | 405 else | 
| 406 window.requestAnimationFrame(makeFrame); | 406 window.requestAnimationFrame(makeFrame); | 
| 407 } | 407 } | 
| 408 } | 408 } | 
| OLD | NEW |