(iterator)
| 95 | // value or throws an exception. |
| 96 | // |
| 97 | each(iterator) { |
| 98 | // Invoking bindEnvironment'd callbacks outside of a Fiber in Node doesn't |
| 99 | // run them to completion (and exceptions thrown from onException are not |
| 100 | // propagated), so we need to be in a Fiber. |
| 101 | Meteor._nodeCodeMustBeInFiber(); |
| 102 | |
| 103 | var ids = Object.keys(this.callbacks); |
| 104 | for (var i = 0; i < ids.length; ++i) { |
| 105 | var id = ids[i]; |
| 106 | // check to see if the callback was removed during iteration |
| 107 | if (hasOwn.call(this.callbacks, id)) { |
| 108 | var callback = this.callbacks[id]; |
| 109 | if (! iterator(callback)) { |
| 110 | break; |
| 111 | } |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // Copied from Meteor.bindEnvironment and removed all the env stuff. |
no test coverage detected