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

Unified Diff: tracing/tracing/ui/base/dom_helpers.html

Issue 2386873002: Implement single/multi V8 GC objects statistics sub view. (Closed)
Patch Set: remove diff Created 4 years, 2 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: tracing/tracing/ui/base/dom_helpers.html
diff --git a/tracing/tracing/ui/base/dom_helpers.html b/tracing/tracing/ui/base/dom_helpers.html
index 2763385b6522ad542018fb4cdadbd7f38eabfbc0..8cbb7f88f00f5b8a946fc3e44a250eba4c3de9f2 100644
--- a/tracing/tracing/ui/base/dom_helpers.html
+++ b/tracing/tracing/ui/base/dom_helpers.html
@@ -50,7 +50,7 @@ tr.exportTo('tr.ui.b', function() {
spanEl.style.color = opt_dictionary.color;
}
return spanEl;
- };
+ }
function createDiv(opt_dictionary) {
var divEl = document.createElement('div');
@@ -66,7 +66,7 @@ tr.exportTo('tr.ui.b', function() {
divEl.style.maxWidth = opt_dictionary.maxWidth;
}
return divEl;
- };
+ }
function createScopedStyle(styleContent) {
var styleEl = document.createElement('style');
@@ -234,13 +234,18 @@ tr.exportTo('tr.ui.b', function() {
var buttonEl = document.createElement('input');
buttonEl.type = 'checkbox';
- var initialValue = tr.b.Settings.get(settingsKey, defaultValue);
- buttonEl.checked = !!initialValue;
+ var initialValue = defaultValue;
+ if (settingsKey !== undefined) {
+ initialValue = tr.b.Settings.get(settingsKey, defaultValue);
+ buttonEl.checked = !!initialValue;
+ }
if (targetEl)
targetEl[targetElProperty] = initialValue;
function onChange() {
- tr.b.Settings.set(settingsKey, buttonEl.checked);
+ if (settingsKey !== undefined) {
+ tr.b.Settings.set(settingsKey, buttonEl.checked);
+ }
if (targetEl)
targetEl[targetElProperty] = buttonEl.checked;
if (opt_changeCb)

Powered by Google App Engine
This is Rietveld 408576698