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

Unified Diff: chrome/browser/resources/settings/site_settings/cookie_tree_node.js

Issue 2379913003: Site Settings Desktop: Polish the Site Data details dialog. (Closed)
Patch Set: Created 4 years, 3 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: chrome/browser/resources/settings/site_settings/cookie_tree_node.js
diff --git a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js
index 1effb8748b248cc31cc36c8c469089ea4a32133d..dfa4f65ab1809eaf227c9f96aba865e0bb0570eb 100644
--- a/chrome/browser/resources/settings/site_settings/cookie_tree_node.js
+++ b/chrome/browser/resources/settings/site_settings/cookie_tree_node.js
@@ -175,8 +175,12 @@ cr.define('settings', function() {
var dataType = '';
if (descriptionNode.data_.type != undefined)
dataType = descriptionNode.data_.type;
- else
- dataType = descriptionNode.children_[0].data_.type;
+ else {
dschuyler 2016/09/29 19:40:27 If the |else| has braces {} the |if| should also (
Finnur 2016/09/30 09:19:42 Ah, yes, I indeed.
+ // A description node can have no children when in the process of
+ // being deleted.
dschuyler 2016/09/29 19:40:27 optional: // A description node might not have chi
Finnur 2016/09/30 09:19:42 Done.
+ if (descriptionNode.children_.length > 0)
+ dataType = descriptionNode.children_[0].data_.type;
Finnur 2016/09/29 15:54:01 This is not listed in the bug, but was discovered
dschuyler 2016/09/29 19:40:27 Thanks for the explanation!
+ }
var count =
(dataType == 'cookie') ? descriptionNode.children_.length : 0;

Powered by Google App Engine
This is Rietveld 408576698