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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /** 1 /**
2 * @constructor 2 * @constructor
3 * @extends {WebInspector.SDKModel} 3 * @extends {WebInspector.SDKModel}
4 * @param {!WebInspector.Target} target 4 * @param {!WebInspector.Target} target
5 */ 5 */
6 WebInspector.HeapProfilerModel = function(target) 6 WebInspector.HeapProfilerModel = function(target)
7 { 7 {
8 WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target); 8 WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target);
9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this)); 9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this));
10 this._enabled = false; 10 this._enabled = false;
11 this._heapProfilerAgent = target.heapProfilerAgent(); 11 this._heapProfilerAgent = target.heapProfilerAgent();
12 } 12 }
13 13
14 /** @enum {symbol} */
14 WebInspector.HeapProfilerModel.Events = { 15 WebInspector.HeapProfilerModel.Events = {
15 HeapStatsUpdate: "HeapStatsUpdate", 16 HeapStatsUpdate: Symbol("HeapStatsUpdate"),
16 LastSeenObjectId: "LastSeenObjectId", 17 LastSeenObjectId: Symbol("LastSeenObjectId"),
17 AddHeapSnapshotChunk: "AddHeapSnapshotChunk", 18 AddHeapSnapshotChunk: Symbol("AddHeapSnapshotChunk"),
18 ReportHeapSnapshotProgress: "ReportHeapSnapshotProgress", 19 ReportHeapSnapshotProgress: Symbol("ReportHeapSnapshotProgress"),
19 ResetProfiles: "ResetProfiles" 20 ResetProfiles: Symbol("ResetProfiles")
20 } 21 }
21 22
22 WebInspector.HeapProfilerModel.prototype = { 23 WebInspector.HeapProfilerModel.prototype = {
23 enable: function() 24 enable: function()
24 { 25 {
25 if (this._enabled) 26 if (this._enabled)
26 return; 27 return;
27 28
28 this._enabled = true; 29 this._enabled = true;
29 this._heapProfilerAgent.enable(); 30 this._heapProfilerAgent.enable();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 }, 141 },
141 142
142 /** 143 /**
143 * @override 144 * @override
144 */ 145 */
145 resetProfiles: function() 146 resetProfiles: function()
146 { 147 {
147 this._heapProfilerModel.resetProfiles(); 148 this._heapProfilerModel.resetProfiles();
148 } 149 }
149 } 150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698