Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: Source/devtools/front_end/sdk/TracingModel.js

Issue 471393002: Revert of Make profiling lock global rather than per Target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @extends {WebInspector.SDKObject} 9 * @extends {WebInspector.SDKObject}
10 */ 10 */
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 return this._devtoolsWorkerMetadataEvents; 94 return this._devtoolsWorkerMetadataEvents;
95 }, 95 },
96 96
97 /** 97 /**
98 * @param {string} categoryFilter 98 * @param {string} categoryFilter
99 * @param {string} options 99 * @param {string} options
100 * @param {function(?string)=} callback 100 * @param {function(?string)=} callback
101 */ 101 */
102 start: function(categoryFilter, options, callback) 102 start: function(categoryFilter, options, callback)
103 { 103 {
104 WebInspector.profilingLock.acquire(); 104 this.target().profilingLock.acquire();
105 this.reset(); 105 this.reset();
106 var bufferUsageReportingIntervalMs = 500; 106 var bufferUsageReportingIntervalMs = 500;
107 TracingAgent.start(categoryFilter, options, bufferUsageReportingInterval Ms, callback); 107 TracingAgent.start(categoryFilter, options, bufferUsageReportingInterval Ms, callback);
108 this._active = true; 108 this._active = true;
109 }, 109 },
110 110
111 stop: function() 111 stop: function()
112 { 112 {
113 if (!this._active) 113 if (!this._active)
114 return; 114 return;
115 TracingAgent.end(this._onStop.bind(this)); 115 TracingAgent.end(this._onStop.bind(this));
116 WebInspector.profilingLock.release(); 116 this.target().profilingLock.release();
117 }, 117 },
118 118
119 /** 119 /**
120 * @return {?string} 120 * @return {?string}
121 */ 121 */
122 sessionId: function() 122 sessionId: function()
123 { 123 {
124 return this._sessionId; 124 return this._sessionId;
125 }, 125 },
126 126
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 started: function(consoleTimeline, sessionId) 676 started: function(consoleTimeline, sessionId)
677 { 677 {
678 this._tracingModel._tracingStarted(sessionId); 678 this._tracingModel._tracingStarted(sessionId);
679 }, 679 },
680 680
681 stopped: function() 681 stopped: function()
682 { 682 {
683 this._tracingModel._onStop(); 683 this._tracingModel._onStop();
684 } 684 }
685 } 685 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/TimelineManager.js ('k') | Source/devtools/front_end/sdk/WorkerTargetManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698