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

Unified Diff: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js

Issue 648153002: DevTools: Fix "toolbox" app startup in the debug_devtools mode (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use "complete" state only Created 6 years, 2 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: Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
diff --git a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
index eb8cdbb571ae86cc2c271f4823255a750d57e2d7..5f557f2549905a1afc37257aba35c478fd7d7cf8 100644
--- a/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
+++ b/Source/devtools/front_end/toolbox_bootstrap/Toolbox.js
@@ -2,13 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-function windowLoaded()
-{
- window.removeEventListener("DOMContentLoaded", windowLoaded, false);
- new WebInspector.Toolbox();
-}
-window.addEventListener("DOMContentLoaded", windowLoaded, false);
-
/**
* @constructor
*/
@@ -40,3 +33,14 @@ WebInspector.Toolbox = function()
// FIXME: This stub is invoked from the backend and should be removed
// once we migrate to the "pull" model for extensions retrieval.
WebInspector.addExtensions = function() {}
+
+function windowLoaded()
+{
+ window.removeEventListener("DOMContentLoaded", windowLoaded, false);
+ new WebInspector.Toolbox();
+}
+
+if (document.readyState === "complete")
+ new WebInspector.Toolbox();
+else
+ window.addEventListener("DOMContentLoaded", windowLoaded, false);
« 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