Chromium Code Reviews| Index: webkit/glue/devtools/js/devtools.js |
| =================================================================== |
| --- webkit/glue/devtools/js/devtools.js (revision 34248) |
| +++ webkit/glue/devtools/js/devtools.js (working copy) |
| @@ -483,6 +483,23 @@ |
| })(); |
| +// We need to have a place for postponed tasks |
| +// which should be executed when all the messages between agent and frontend |
| +// are processed. |
|
yurys
2009/12/10 15:53:06
no new line after the comment
|
| + |
| +WebInspector.runAfterPendingDispatchesQueue = []; |
| + |
| +WebInspector.runAfterPendingDispatches = function(callback) { |
| + this.runAfterPendingDispatchesQueue.push(callback); |
| +}; |
| + |
| +WebInspector.queuesAreEmpty = function() { |
| + var copy = this.runAfterPendingDispatchesQueue.slice(); |
| + this.runAfterPendingDispatchesQueue = []; |
| + for (var i = 0; i < copy.length; ++i) |
| + copy[i].call(this); |
| +}; |
| + |
| (function() { |
| var originalAddToFrame = InspectorFrontendHost.addResourceSourceToFrame; |
| InspectorFrontendHost.addResourceSourceToFrame = function(identifier, element) { |