Permalink
Browse files

Move Future.ret alias to fiber_helpers.

  • Loading branch information...
glasser committed Nov 10, 2012
1 parent a87c658 commit 4f952daba6cc10da75bb8fa9d149dd3d204de806
Showing with 11 additions and 3 deletions.
  1. +11 −0 packages/meteor/fiber_helpers.js
  2. +0 −3 packages/mongo-livedata/mongo_driver.js
@@ -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;
+
+})();
@@ -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;

0 comments on commit 4f952da

Please sign in to comment.