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

Side by Side Diff: chrome/browser/resources/device_log_ui/device_log_ui.js

Issue 1643513002: Catch exception when creating device log entries (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var DeviceLogUI = (function() { 5 var DeviceLogUI = (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * Creates a tag for the log level. 9 * Creates a tag for the log level.
10 * 10 *
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 container.appendChild(entry); 88 container.appendChild(entry);
89 } 89 }
90 }; 90 };
91 91
92 /** 92 /**
93 * Callback function, triggered when the log is received. 93 * Callback function, triggered when the log is received.
94 * 94 *
95 * @param {Object} data A JSON structure of event log entries. 95 * @param {Object} data A JSON structure of event log entries.
96 */ 96 */
97 var getLogCallback = function(data) { 97 var getLogCallback = function(data) {
98 createEventLog(JSON.parse(data)); 98 try {
99 createEventLog(JSON.parse(data));
100 } catch(e) {}
stevenjb 2016/01/27 18:13:08 This is fine as-is, but we might want to put somet
99 }; 101 };
100 102
101 /** 103 /**
102 * Requests a log update. 104 * Requests a log update.
103 */ 105 */
104 var requestLog = function() { 106 var requestLog = function() {
105 chrome.send('DeviceLog.getLog'); 107 chrome.send('DeviceLog.getLog');
106 }; 108 };
107 109
108 /** 110 /**
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 checkboxes[i].onclick = requestLog; 142 checkboxes[i].onclick = requestLog;
141 143
142 setRefresh(); 144 setRefresh();
143 requestLog(); 145 requestLog();
144 }); 146 });
145 147
146 return { 148 return {
147 getLogCallback: getLogCallback 149 getLogCallback: getLogCallback
148 }; 150 };
149 })(); 151 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698