Bug 1027246 - replaced function with function* for generators. r=fitzgen

This commit is contained in:
Vikneshwar 2015-02-08 00:48:43 +00:00
parent 20289c96d1
commit c5252b8f8a
3 changed files with 7 additions and 7 deletions

View File

@ -108,7 +108,7 @@ var LocalStore = Class({
return promise.reject(new Error(path + " does not belong to " + this.path));
}
return Task.spawn(function() {
return Task.spawn(function*() {
let parent = yield this.resourceFor(OS.Path.dirname(path));
let info;

View File

@ -123,7 +123,7 @@ let EventsHandler = {
_onTabNavigated: function(event, {isFrameSwitching}) {
switch (event) {
case "will-navigate": {
Task.spawn(function() {
Task.spawn(function*() {
// Make sure the backend is prepared to handle WebGL contexts.
if (!isFrameSwitching) {
gFront.setup({ reload: false });
@ -394,7 +394,7 @@ let ShadersEditorsView = {
editor.clearHistory();
}
return Task.spawn(function() {
return Task.spawn(function*() {
yield view._toggleListeners("off");
yield promise.all([
view._getEditor("vs").then(e => setTextAndClearHistory(e, sources.vs)),
@ -490,7 +490,7 @@ let ShadersEditorsView = {
* The corresponding shader type for the focused editor (e.g. "vs").
*/
_doCompile: function(type) {
Task.spawn(function() {
Task.spawn(function*() {
let editor = yield this._getEditor(type);
let shaderActor = yield ShadersListView.selectedAttachment[type];

View File

@ -99,7 +99,7 @@ let StyleSheetsActor = exports.StyleSheetsActor = protocol.ActorClass({
* Promise that resolves with an array of StyleSheetActors
*/
_addAllStyleSheets: function() {
return Task.spawn(function() {
return Task.spawn(function*() {
let documents = [this.document];
let actors = [];
@ -132,7 +132,7 @@ let StyleSheetsActor = exports.StyleSheetsActor = protocol.ActorClass({
*/
_addStyleSheets: function(styleSheets)
{
return Task.spawn(function() {
return Task.spawn(function*() {
let actors = [];
for (let i = 0; i < styleSheets.length; i++) {
let actor = this.parentActor.createStyleSheetActor(styleSheets[i]);
@ -155,7 +155,7 @@ let StyleSheetsActor = exports.StyleSheetsActor = protocol.ActorClass({
* A promise that resolves with an array of StyleSheetActors
*/
_getImported: function(styleSheet) {
return Task.spawn(function() {
return Task.spawn(function*() {
let rules = yield styleSheet.getCSSRules();
let imported = [];