Move Future.ret alias to fiber_helpers.

This commit is contained in:
David Glasser
2012-11-09 17:28:47 -08:00
parent a87c6580d5
commit 4f952daba6
2 changed files with 11 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
(function () {
var path = __meteor_bootstrap__.require('path');
var Fiber = __meteor_bootstrap__.require('fibers');
var Future = __meteor_bootstrap__.require(path.join('fibers', 'future'));
Meteor._noYieldsAllowed = function (f) {
// "Fiber" and "yield" are both in the global namespace. The yield function is
// at both "yield" and "Fiber.yield". (It's also at require('fibers').yield
@@ -14,3 +20,8 @@ Meteor._noYieldsAllowed = function (f) {
global.yield = savedYield;
}
};
// js2-mode AST blows up when parsing 'future.return()', so alias.
Future.prototype.ret = Future.prototype.return;
})();

View File

@@ -11,9 +11,6 @@ var path = __meteor_bootstrap__.require('path');
var MongoDB = __meteor_bootstrap__.require('mongodb');
var Future = __meteor_bootstrap__.require(path.join('fibers', 'future'));
// js2-mode AST blows up when parsing 'future.return()', so alias.
Future.prototype.ret = Future.prototype.return;
_Mongo = function (url) {
var self = this;