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

Unified Diff: third_party/WebKit/Source/devtools/front_end/common/Settings.js

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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/common/Settings.js
diff --git a/third_party/WebKit/Source/devtools/front_end/common/Settings.js b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
index 7869c34aa7fef76197adf7a32e34939472bf0ac7..b5e159e9f3cc7f6f996e232df35da8a6b8a36d07 100644
--- a/third_party/WebKit/Source/devtools/front_end/common/Settings.js
+++ b/third_party/WebKit/Source/devtools/front_end/common/Settings.js
@@ -265,7 +265,7 @@ WebInspector.Setting.prototype = {
if (this._storage.has(this._name)) {
try {
this._value = JSON.parse(this._storage.get(this._name));
- } catch(e) {
+ } catch (e) {
this._storage.remove(this._name);
}
}
@@ -282,10 +282,10 @@ WebInspector.Setting.prototype = {
var settingString = JSON.stringify(value);
try {
this._storage.set(this._name, settingString);
- } catch(e) {
+ } catch (e) {
this._printSettingsSavingError(e.message, this._name, settingString);
}
- } catch(e) {
+ } catch (e) {
WebInspector.console.error("Cannot stringify setting with name: " + this._name + ", error: " + e.message);
}
this._eventSupport.dispatchEventToListeners(this._name, value);
@@ -519,7 +519,7 @@ WebInspector.VersionController.prototype = {
}
var newName = settingNames[oldName];
- var invert = "WebInspector.Drawer.showOnLoad" === oldName;
+ var invert = oldName === "WebInspector.Drawer.showOnLoad";
var hidden = oldSetting.get() !== invert;
oldSetting.remove();
var showMode = hidden ? "OnlyMain" : "Both";

Powered by Google App Engine
This is Rietveld 408576698