browser.js
function safeStep(callback, stepFn) {
    var err;
    try {
        stepFn();
    }
    catch (error) {
        err = error;
    }
    callback(err);
}
function safeStep(callback, stepFn) {
    var err;
    try {
        stepFn();
    }
    catch (error) {
        err = error;
    }
    callback(err);
}
Runs `stepFn`, catching any error and passing it to `callback` (Node-style).
Otherwise, calls `callback` with no arguments on success.

@param {function()} callback
@param {function()} stepFn