Commit a26d6270 authored by hirono@chromium.org's avatar hirono@chromium.org

Files.app: Move the error handler to the top of combined script.

Currently the error handler to count uncaught errors is set in the file_manager.js.
This CL moved the error handler to the top of combined script, which enable us to catch the uncaught erros that is raised before the file_manager.js is loaded.

BUG=none
TEST=manually

Review URL: https://chromiumcodereview.appspot.com/23536047

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223603 0039d316-1c4b-4281-b951-d872f2087c98
parent 6881f396
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';
/**
* This variable is checked in SelectFileDialogExtensionBrowserTest.
* @type {number}
*/
window.JSErrorCount = 0;
/**
* Count uncaught exceptions.
*/
window.onerror = function() { window.JSErrorCount++; };
......@@ -4,17 +4,6 @@
'use strict';
/**
* This variable is checked in SelectFileDialogExtensionBrowserTest.
* @type {number}
*/
window.JSErrorCount = 0;
/**
* Count uncaught exceptions.
*/
window.onerror = function() { window.JSErrorCount++; };
/**
* FileManager constructor.
*
......
......@@ -66,6 +66,9 @@
(function() {
// 'strict mode' is invoked for this scope.
// // This script must be loaded before all other Files.app's scripts.
//<include src="error_counter.js"/>
//
//<include src="combobutton.js"/>
//<include src="commandbutton.js"/>
//<include src="ui/file_manager_dialog_base.js"/>
......
......@@ -79,6 +79,9 @@
<script src="chrome://resources/js/cr/ui/menu_button.js"></script>
<script src="chrome://resources/js/cr/ui/context_menu_handler.js"></script>
<!-- This script must be loaded before all other Files.app's scripts. -->
<script src="js/error_counter.js"></script>
<script src="js/combobutton.js"></script>
<script src="js/commandbutton.js"></script>
<script src="js/ui/file_manager_dialog_base.js"></script>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment