Index: Source/devtools/front_end/host/InspectorFrontendHost.js |
diff --git a/Source/devtools/front_end/host/InspectorFrontendHost.js b/Source/devtools/front_end/host/InspectorFrontendHost.js |
index bcc2e421fcaec07a9d84990a7d4fa2361ae1480b..60eb42500be880053f13e878480ae2f59c1c7d9d 100644 |
--- a/Source/devtools/front_end/host/InspectorFrontendHost.js |
+++ b/Source/devtools/front_end/host/InspectorFrontendHost.js |
@@ -638,7 +638,6 @@ function InspectorFrontendAPIImpl() |
this._isLoaded = false; |
this._pendingCommands = []; |
this._debugFrontend = !!WebInspector.queryParam("debugFrontend"); |
- this._debugCalls = []; |
var descriptors = InspectorFrontendHostAPI.EventDescriptors; |
for (var i = 0; i < descriptors.length; ++i) |
@@ -665,13 +664,10 @@ InspectorFrontendAPIImpl.prototype = { |
{ |
var params = Array.prototype.slice.call(arguments, 3); |
- if (this._debugFrontend) { |
- this._debugCalls.push(innerDispatch.bind(this)); |
- if (this._debugCalls.length === 1) |
- window.setTimeout(this._onDebugTimeout.bind(this), 0); |
- } else { |
+ if (this._debugFrontend) |
+ setImmediate(innerDispatch.bind(this)); |
+ else |
innerDispatch.call(this); |
- } |
/** |
* @this {!InspectorFrontendAPIImpl} |
@@ -698,12 +694,6 @@ InspectorFrontendAPIImpl.prototype = { |
} |
}, |
- _onDebugTimeout: function() |
- { |
- while (this._debugCalls.length) |
- this._debugCalls.shift()(); |
- }, |
- |
/** |
* @param {function()} command |
*/ |