Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/common/FormatterWorkerPool.js

Issue 1917863008: DevTools: [SASS] introduce Gonzales-PE for SCSS parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebaseline Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 */ 7 */
8 WebInspector.FormatterWorkerPool = function() 8 WebInspector.FormatterWorkerPool = function()
9 { 9 {
10 this._taskQueue = []; 10 this._taskQueue = [];
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 _onWorkerMessage: function(worker, event) 52 _onWorkerMessage: function(worker, event)
53 { 53 {
54 var task = this._workerTasks.get(worker); 54 var task = this._workerTasks.get(worker);
55 if (task.isChunked && event.data && !event.data["isLastChunk"]) { 55 if (task.isChunked && event.data && !event.data["isLastChunk"]) {
56 task.callback(event); 56 task.callback(event);
57 return; 57 return;
58 } 58 }
59 59
60 this._workerTasks.set(worker, null); 60 this._workerTasks.set(worker, null);
61 this._processNextTask(); 61 this._processNextTask();
62 task.callback(event); 62 task.callback(event.data ? event : null);
63 }, 63 },
64 64
65 /** 65 /**
66 * @param {!WebInspector.Worker} worker 66 * @param {!WebInspector.Worker} worker
67 * @param {!Event} event 67 * @param {!Event} event
68 */ 68 */
69 _onWorkerError: function(worker, event) 69 _onWorkerError: function(worker, event)
70 { 70 {
71 console.error(event); 71 console.error(event);
72 var task = this._workerTasks.get(worker); 72 var task = this._workerTasks.get(worker);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 WebInspector.FormatterWorkerPool.Task = function(method, params, callback, isChu nked) 117 WebInspector.FormatterWorkerPool.Task = function(method, params, callback, isChu nked)
118 { 118 {
119 this.method = method; 119 this.method = method;
120 this.params = params; 120 this.params = params;
121 this.callback = callback; 121 this.callback = callback;
122 this.isChunked = isChunked; 122 this.isChunked = isChunked;
123 } 123 }
124 124
125 /** @type {!WebInspector.FormatterWorkerPool} */ 125 /** @type {!WebInspector.FormatterWorkerPool} */
126 WebInspector.formatterWorkerPool; 126 WebInspector.formatterWorkerPool;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/devtools.gypi ('k') | third_party/WebKit/Source/devtools/front_end/externs.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698