| OLD | NEW |
| 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 'use strict'; | |
| 6 | |
| 7 /** | 5 /** |
| 8 * This variable is checked in SelectFileDialogExtensionBrowserTest. | 6 * This variable is checked in SelectFileDialogExtensionBrowserTest. |
| 9 * @type {number} | 7 * @type {number} |
| 10 */ | 8 */ |
| 11 window.JSErrorCount = 0; | 9 window.JSErrorCount = 0; |
| 12 | 10 |
| 13 /** | 11 /** |
| 14 * Counts uncaught exceptions. | 12 * Counts uncaught exceptions. |
| 15 */ | 13 */ |
| 16 window.onerror = function() { window.JSErrorCount++; }; | 14 window.onerror = function() { window.JSErrorCount++; }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 41 // the exception message and stack trace just in case. | 39 // the exception message and stack trace just in case. |
| 42 // The message will show twice if the caller handles exception correctly. | 40 // The message will show twice if the caller handles exception correctly. |
| 43 console.error(e.stack); | 41 console.error(e.stack); |
| 44 console.info('Exception above happened in callback.', liveStack); | 42 console.info('Exception above happened in callback.', liveStack); |
| 45 | 43 |
| 46 window.JSErrorCount++; | 44 window.JSErrorCount++; |
| 47 throw e; | 45 throw e; |
| 48 } | 46 } |
| 49 } | 47 } |
| 50 }; | 48 }; |
| OLD | NEW |