(cm, f)
| 3192 | |
| 3193 | // Run the given function in an operation |
| 3194 | function runInOp(cm, f) { |
| 3195 | if (cm.curOp) return f(); |
| 3196 | startOperation(cm); |
| 3197 | try { return f(); } |
| 3198 | finally { endOperation(cm); } |
| 3199 | } |
| 3200 | // Wraps a function in an operation. Returns the wrapped function. |
| 3201 | function operation(cm, f) { |
| 3202 | return function() { |
no test coverage detected