Backed out changeset f4240674fd6c (bug 1027246)
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Tue, 10 Feb 2015 13:55:14 +0100
changeset 242075 d8f641228a9b97246636fd94cf1da79d1438774e
parent 242074 973bc28ad21fe5fd643b67335cea08839f08d6e5
child 242076 6ad00b017a2b9c1371b5991e506af522e611e151
push id634
push usermozilla@noorenberghe.ca
push dateTue, 10 Feb 2015 22:34:30 +0000
bugs1027246
milestone38.0a1
backs outf4240674fd6c18bdd59c759bd658c6ec3ab2012a
Backed out changeset f4240674fd6c (bug 1027246)
browser/devtools/projecteditor/lib/stores/local.js
toolkit/devtools/server/actors/stylesheets.js
--- a/browser/devtools/projecteditor/lib/stores/local.js
+++ b/browser/devtools/projecteditor/lib/stores/local.js
@@ -117,17 +117,17 @@ var LocalStore = Class({
       } catch (ex if ex instanceof OS.File.Error && ex.becauseNoSuchFile) {
         if (!options.create) {
           throw ex;
         }
       }
 
       let resource = this._forPath(path, info);
       parent.addChild(resource);
-      return resource;
+      throw new Task.Result(resource);
     }.bind(this));
   },
 
   refreshLoop: function() {
     // XXX: Once Bug 958280 adds a watch function, will not need to forever loop here.
     this.refresh().then(() => {
       if (SHOULD_LIVE_REFRESH) {
         this._refreshTimeout = setTimeout(this.refreshLoop,
--- a/toolkit/devtools/server/actors/stylesheets.js
+++ b/toolkit/devtools/server/actors/stylesheets.js
@@ -111,17 +111,17 @@ let StyleSheetsActor = exports.StyleShee
         for (let iframe of doc.getElementsByTagName("iframe")) {
           if (iframe.contentDocument) {
             // Sometimes, iframes don't have any document, like the
             // one that are over deeply nested (bug 285395)
             documents.push(iframe.contentDocument);
           }
         }
       }
-      return actors;
+      throw new Task.Result(actors);
     }.bind(this));
   },
 
   /**
    * Add all the stylesheets to the map and create an actor for each one
    * if not already created.
    *
    * @param {[DOMStyleSheet]} styleSheets
@@ -137,17 +137,17 @@ let StyleSheetsActor = exports.StyleShee
       for (let i = 0; i < styleSheets.length; i++) {
         let actor = this.parentActor.createStyleSheetActor(styleSheets[i]);
         actors.push(actor);
 
         // Get all sheets, including imported ones
         let imports = yield this._getImported(actor);
         actors = actors.concat(imports);
       }
-      return actors;
+      throw new Task.Result(actors);
     }.bind(this));
   },
 
   /**
    * Get all the stylesheets @imported from a stylesheet.
    *
    * @param  {DOMStyleSheet} styleSheet
    *         Style sheet to search
@@ -175,17 +175,17 @@ let StyleSheetsActor = exports.StyleShee
           imported = imported.concat(children);
         }
         else if (rule.type != Ci.nsIDOMCSSRule.CHARSET_RULE) {
           // @import rules must precede all others except @charset
           break;
         }
       }
 
-      return imported;
+      throw new Task.Result(imported);
     }.bind(this));
   },
 
 
   /**
    * Create a new style sheet in the document with the given text.
    * Return an actor for it.
    *