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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
index 746c8c7107889890698d565dab02a024c54886d1..362a37312c753dc9887d46fd7586c6f779594e65 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js
@@ -45,14 +45,12 @@ WebInspector.ProfileType = function(id, name)
window.addEventListener("unload", this._clearTempStorage.bind(this), false);
}
-/**
- * @enum {string}
- */
+/** @enum {symbol} */
WebInspector.ProfileType.Events = {
- AddProfileHeader: "add-profile-header",
- ProfileComplete: "profile-complete",
- RemoveProfileHeader: "remove-profile-header",
- ViewUpdated: "view-updated"
+ AddProfileHeader: Symbol("add-profile-header"),
+ ProfileComplete: Symbol("profile-complete"),
+ RemoveProfileHeader: Symbol("remove-profile-header"),
+ ViewUpdated: Symbol("view-updated")
}
WebInspector.ProfileType.prototype = {
@@ -331,9 +329,10 @@ WebInspector.ProfileHeader.StatusUpdate = function(subtitle, wait)
this.wait = wait;
}
+/** @enum {symbol} */
WebInspector.ProfileHeader.Events = {
- UpdateStatus: "UpdateStatus",
- ProfileReceived: "ProfileReceived"
+ UpdateStatus: Symbol("UpdateStatus"),
+ ProfileReceived: Symbol("ProfileReceived")
}
WebInspector.ProfileHeader.prototype = {

Powered by Google App Engine
This is Rietveld 408576698