Changeset 117227 in webkit
- Timestamp:
- May 16, 2012 12:36:06 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r117226 r117227 1 2012-05-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 3 Unreviewed, rolling out r117050. 4 http://trac.webkit.org/changeset/117050 5 https://bugs.webkit.org/show_bug.cgi?id=86587 6 7 "Some heap profiler tests started timing out" (Requested by 8 yurys on #webkit). 9 10 * inspector/front-end/HeapSnapshotProxy.js: 11 (WebInspector.HeapSnapshotFakeWorker): 12 (WebInspector.HeapSnapshotFakeWorker.prototype.postMessage): 13 (WebInspector.HeapSnapshotFakeWorker.prototype._postMessageFromWorker): 14 1 15 2012-05-16 Sheriff Bot <webkit.review.bot@gmail.com> 2 16 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js
r117051 r117227 79 79 /** 80 80 * @constructor 81 */82 WebInspector.AsyncTaskQueue = function()83 {84 this._queue = [];85 this._isTimerSheduled = false;86 }87 88 WebInspector.AsyncTaskQueue.prototype = {89 /**90 * @param {function()} task91 */92 addTask: function(task)93 {94 this._queue.push(task);95 this._scheduleTimer();96 },97 98 _onTimeout: function()99 {100 this._isTimerSheduled = false;101 var task = this._queue.shift();102 try {103 task();104 } finally {105 this._scheduleTimer();106 }107 },108 109 _scheduleTimer: function()110 {111 if (this._queue.length && !this._isTimerSheduled) {112 setTimeout(this._onTimeout.bind(this), 0);113 this._isTimerSheduled = true;114 }115 }116 }117 118 /**119 * @constructor120 81 * @extends {WebInspector.HeapSnapshotWorkerWrapper} 121 82 */ … … 123 84 { 124 85 this._dispatcher = new WebInspector.HeapSnapshotWorkerDispatcher(window, this._postMessageFromWorker.bind(this)); 125 this._asyncTaskQueue = new WebInspector.AsyncTaskQueue();126 86 } 127 87 … … 134 94 this._dispatcher.dispatchMessage({data: message}); 135 95 } 136 this._asyncTaskQueue.addTask(dispatch.bind(this));96 setTimeout(dispatch.bind(this), 0); 137 97 }, 138 98 … … 148 108 this.dispatchEventToListeners("message", message); 149 109 } 150 this._asyncTaskQueue.addTask(send.bind(this));110 setTimeout(send.bind(this), 0); 151 111 } 152 112 };
Note: See TracChangeset
for help on using the changeset viewer.