Index: third_party/WebKit/Source/devtools/front_end/main/Main.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js |
index d7953f71171d9d093e3ca034e35011d671f645d9..b67f01d7f5f91b22f1edc76880e3e0f41c913caf 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js |
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js |
@@ -318,22 +318,20 @@ WebInspector.Main.prototype = { |
this._mainTarget.registerInspectorDispatcher(this); |
InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.ReloadInspectedPage, this._reloadInspectedPage, this); |
+ InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Events.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); |
if (this._mainTarget.isServiceWorker() || this._mainTarget.isPage()) |
this._mainTarget.runtimeAgent().run(); |
- this._mainTarget.inspectorAgent().enable(inspectorAgentEnableCallback); |
+ this._mainTarget.inspectorAgent().enable(); |
+ InspectorFrontendHost.readyForTest(); |
- function inspectorAgentEnableCallback() |
- { |
- console.timeStamp("Main.inspectorAgentEnableCallback"); |
- InspectorFrontendHost.readyForTest(); |
- // Asynchronously run the extensions. |
- setTimeout(lateInitialization, 0); |
- } |
+ // Asynchronously run the extensions. |
+ setTimeout(lateInitialization, 0); |
function lateInitialization() |
{ |
+ console.timeStamp("Main.lateInitialization"); |
WebInspector.extensionServer.initializeExtensions(); |
} |
}, |
@@ -611,15 +609,16 @@ WebInspector.Main.prototype = { |
}, |
/** |
- * @override |
- * @param {number} callId |
- * @param {string} script |
+ * @param {!WebInspector.Event} event |
*/ |
- evaluateForTestInFrontend: function(callId, script) |
+ _evaluateForTestInFrontend: function(event) |
{ |
if (!InspectorFrontendHost.isUnderTest()) |
return; |
+ var callId = /** @type {number} */ (event.data["callId"]); |
+ var script = /** @type {number} */ (event.data["script"]); |
+ |
/** |
* @suppressGlobalPropertiesCheck |
*/ |