X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2FWebKit%2FSource%2Fdevtools%2Ffront_end%2Ftimeline%2FTimelineModelImpl.js;h=167135e18f8a2fbe42c176fcc620979658656c56;hb=1afa4dd80ef85af7c90efaea6959db1d92330844;hp=e427b1fb1c2b037403523d3652fdeb35831dee2e;hpb=90762837333c13ccf56f2ad88e4481fc71e8d281;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModelImpl.js b/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModelImpl.js index e427b1f..167135e 100644 --- a/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModelImpl.js +++ b/src/third_party/WebKit/Source/devtools/front_end/timeline/TimelineModelImpl.js @@ -42,11 +42,11 @@ WebInspector.TimelineModelImpl.prototype = { }, /** - * @param {boolean} captureStacks + * @param {boolean} captureCauses * @param {boolean} captureMemory * @param {boolean} capturePictures */ - startRecording: function(captureStacks, captureMemory, capturePictures) + startRecording: function(captureCauses, captureMemory, capturePictures) { console.assert(!capturePictures, "Legacy timeline does not support capturing pictures"); this.reset(); @@ -54,7 +54,7 @@ WebInspector.TimelineModelImpl.prototype = { console.assert(this._currentTarget); this._clientInitiatedRecording = true; - var maxStackFrames = captureStacks ? 30 : 0; + var maxStackFrames = captureCauses ? 30 : 0; var includeGPUEvents = Runtime.experiments.isEnabled("gpuTimeline"); var liveEvents = [ WebInspector.TimelineModel.RecordType.BeginFrame, WebInspector.TimelineModel.RecordType.DrawFrame, @@ -139,7 +139,7 @@ WebInspector.TimelineModelImpl.prototype = { if (event.data.consoleTimeline) { // Stopped from console. - this._fireRecordingStopped(null, null); + this._fireRecordingStopped(null); } this._collectionEnabled = false; @@ -163,12 +163,9 @@ WebInspector.TimelineModelImpl.prototype = { /** * @param {?Protocol.Error} error - * @param {?ProfilerAgent.CPUProfile} cpuProfile */ - _fireRecordingStopped: function(error, cpuProfile) + _fireRecordingStopped: function(error) { - if (cpuProfile) - WebInspector.TimelineJSProfileProcessor.mergeJSProfileIntoTimeline(this, cpuProfile); this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordingStopped); }, @@ -236,10 +233,42 @@ WebInspector.TimelineModelImpl.prototype = { this._payloads = []; this._stringPool = {}; this._bindings._reset(); + this._minimumRecordTime = 0; + this._maximumRecordTime = 0; WebInspector.TimelineModel.prototype.reset.call(this); }, /** + * @return {number} + */ + minimumRecordTime: function() + { + return this._minimumRecordTime; + }, + + /** + * @return {number} + */ + maximumRecordTime: function() + { + return this._maximumRecordTime; + }, + + /** + * @param {!WebInspector.TimelineModel.Record} record + */ + _updateBoundaries: function(record) + { + var startTime = record.startTime(); + var endTime = record.endTime(); + + if (!this._minimumRecordTime || startTime < this._minimumRecordTime) + this._minimumRecordTime = startTime; + if (endTime > this._maximumRecordTime) + this._maximumRecordTime = endTime; + }, + + /** * @param {!TimelineAgent.TimelineEvent} record */ _internStrings: function(record) @@ -495,7 +524,7 @@ WebInspector.TimelineModel.RecordImpl.prototype = { setUserObject: function(key, value) { if (!this._userObjects) - this._userObjects = new StringMap(); + this._userObjects = new Map(); this._userObjects.set(key, value); },