diff --git a/packages/meteor/async_helpers.js b/packages/meteor/async_helpers.js index fc1175d9c0..6bcb8a38ed 100644 --- a/packages/meteor/async_helpers.js +++ b/packages/meteor/async_helpers.js @@ -133,10 +133,7 @@ Object.assign(AsynchronousQueue.prototype, { ); const handle = { - task: Meteor.bindEnvironment(task, function (e) { - Meteor._debug('Exception from task', e); - throw e; - }), + task, name: task.name, resolver, }; diff --git a/packages/mongo/mongo_driver.js b/packages/mongo/mongo_driver.js index 69d9b86f7b..feff2edd7b 100644 --- a/packages/mongo/mongo_driver.js +++ b/packages/mongo/mongo_driver.js @@ -338,10 +338,6 @@ var writeCallback = function (write, refresh, callback) { }; }; -var bindEnvironmentForWrite = function (callback) { - return Meteor.bindEnvironment(callback, "Mongo write"); -}; - MongoConnection.prototype.insertAsync = async function (collection_name, document) { const self = this; @@ -967,24 +963,8 @@ Cursor.prototype.observeAsync = function (callbacks) { Cursor.prototype.observeChanges = function (callbacks, options = {}) { var self = this; - var methods = [ - 'addedAt', - 'added', - 'changedAt', - 'changed', - 'removedAt', - 'removed', - 'movedTo' - ]; - var ordered = LocalCollection._observeChangesCallbacksAreOrdered(callbacks); - let exceptionName = callbacks._fromObserve ? 'observe' : 'observeChanges'; - exceptionName += ' callback'; - methods.forEach(function (method) { - if (callbacks[method] && typeof callbacks[method] == "function") { - callbacks[method] = Meteor.bindEnvironment(callbacks[method], method + exceptionName); - } - }); + var ordered = LocalCollection._observeChangesCallbacksAreOrdered(callbacks); return self._mongo._observeChanges( self._cursorDescription, ordered, callbacks, options.nonMutatingCallbacks);