Index: third_party/WebKit/Source/devtools/front_end/inspector.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/inspector.js b/third_party/WebKit/Source/devtools/front_end/inspector.js |
index 322527dd3615afe7a2f35fb61acc224fbeddf00f..0b71b5b5b64ee16ac0bfe3c9ae899eaca46b03be 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/inspector.js |
+++ b/third_party/WebKit/Source/devtools/front_end/inspector.js |
@@ -2,4 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-Runtime.startApplication("inspector"); |
+// Preload protocol resources for hosted mode. |
+if (!/** @type {?Object} */(window.InspectorFrontendHost)) { |
+ Promise.all([ |
+ Runtime.loadResourceIntoCache("./sdk/protocol/browser_protocol.json", false /* appendSourceURL */), |
+ Runtime.loadResourceIntoCache("./sdk/protocol/js_protocol.json", false /* appendSourceURL */) |
+ ]).then(() => Runtime.startApplication("inspector")); |
+} else { |
+ Runtime.startApplication("inspector"); |
+} |
+ |