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

Unified Diff: ui/file_manager/file_manager/common/js/error_util.js

Issue 941253002: Files.app: Fix flakiness of OpenFileDialog tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/common/js/error_util.js
diff --git a/ui/file_manager/file_manager/common/js/error_util.js b/ui/file_manager/file_manager/common/js/error_util.js
index 9fd8f118d75361ef974928b4ae88950aafe1875f..4399f1604a2883f6a2202be824939e88f8fbc7d8 100644
--- a/ui/file_manager/file_manager/common/js/error_util.js
+++ b/ui/file_manager/file_manager/common/js/error_util.js
@@ -11,7 +11,13 @@ window.JSErrorCount = 0;
/**
* Count uncaught exceptions.
*/
-window.onerror = function() { window.JSErrorCount++; };
+window.onerror = function(message, url) {
+ // Analytics raises errors if the tracker instance is initiated in guest mode.
+ // crbug.com/459983
+ if (url === 'chrome://resources/js/analytics.js')
+ return;
+ window.JSErrorCount++;
+};
// Overrides console.error() to count errors.
/**
« 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