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

Unified Diff: chrome/browser/resources/bookmark_manager/js/main.js

Issue 1059413005: Checking node object before checking its property. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes as per review comments. Created 5 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
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/bmm.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/bookmark_manager/js/main.js
diff --git a/chrome/browser/resources/bookmark_manager/js/main.js b/chrome/browser/resources/bookmark_manager/js/main.js
index dea7bfb756b36c3eb7a04defe9005caaf307d9b3..82901b1e33bf77c8e29ba4a4efaabd69b3e685e7 100644
--- a/chrome/browser/resources/bookmark_manager/js/main.js
+++ b/chrome/browser/resources/bookmark_manager/js/main.js
@@ -317,8 +317,12 @@ function getAllUrls(nodes) {
var urls = [];
// Adds the node and all its direct children.
+ // TODO(deepak.m1): Here node should exist. When we delete the nodes then
+ // datamodel gets updated but still it shows deleted items as selected items
+ // and accessing those nodes throws chrome.runtime.lastError. This cause
+ // undefined value for node. Please refer https://crbug.com/480935.
function addNodes(node) {
- if (node.id == 'new')
+ if (!node || node.id == 'new')
return;
if (node.children) {
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/bmm.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698