Changeset 238750 in webkit
- Timestamp:
- Nov 30, 2018, 1:13:27 PM (6 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r238743 r238750 1 2018-11-30 Joseph Pecoraro <pecoraro@apple.com> 2 3 Web Inspector: Uncaught Exception opening Web Inspector to Debugger Tab 4 https://bugs.webkit.org/show_bug.cgi?id=192174 5 6 Reviewed by Devin Rousso. 7 8 * UserInterface/Protocol/InspectorBackend.js: 9 (InspectorBackendClass.prototype.runAfterPendingDispatches): 10 Dispatch the callback with a timeout if there is no backend target yet 11 so it doesn't get lost. 12 13 * UserInterface/Protocol/Connection.js: 14 (InspectorBackend.Connection.prototype.runAfterPendingDispatches): 15 Change the ambiguous name "script" to the more familiar "callback". 16 1 17 2018-11-30 Devin Rousso <drousso@apple.com> 2 18 -
trunk/Source/WebInspectorUI/UserInterface/Protocol/Connection.js
r238330 r238750 39 39 this._pendingResponses = new Map; 40 40 this._agents = {}; 41 this._deferred Scripts = [];41 this._deferredCallbacks = []; 42 42 this._target = null; 43 43 } … … 73 73 } 74 74 75 runAfterPendingDispatches( script)76 { 77 console.assert(typeof script=== "function");75 runAfterPendingDispatches(callback) 76 { 77 console.assert(typeof callback === "function"); 78 78 79 79 if (!this._pendingResponses.size) 80 script.call(this);80 callback.call(this); 81 81 else 82 this._deferred Scripts.push(script);82 this._deferredCallbacks.push(callback); 83 83 } 84 84 … … 131 131 tracer.logDidHandleResponse(this, messageObject, {rtt: roundTripTime, dispatch: processingTime}); 132 132 133 if (this._deferred Scripts.length && !this._pendingResponses.size)133 if (this._deferredCallbacks.length && !this._pendingResponses.size) 134 134 this._flushPendingScripts(); 135 135 } … … 268 268 console.assert(this._pendingResponses.size === 0); 269 269 270 let scriptsToRun = this._deferred Scripts;271 this._deferred Scripts = [];270 let scriptsToRun = this._deferredCallbacks; 271 this._deferredCallbacks = []; 272 272 for (let script of scriptsToRun) 273 273 script.call(this); -
trunk/Source/WebInspectorUI/UserInterface/Protocol/InspectorBackend.js
r238331 r238750 173 173 } 174 174 175 runAfterPendingDispatches(script) 176 { 175 runAfterPendingDispatches(callback) 176 { 177 if (!WI.mainTarget) { 178 callback(); 179 return; 180 } 181 177 182 // FIXME: Should this respect pending dispatches in all connections? 178 WI.mainTarget.connection.runAfterPendingDispatches( script);183 WI.mainTarget.connection.runAfterPendingDispatches(callback); 179 184 } 180 185
Note:
See TracChangeset
for help on using the changeset viewer.