function _bindAllCallbacks(shim, fn, name, args, spec) {
  // Check for a normal callback.
  if (spec?.spec?.callback !== null) {
    _bindCallback({
      context: this,
      callback: spec.spec.callback,
      binder: shim.bindCallbackSegment.bind(shim, spec.spec),
      shim,
      fn,
      args,
      spec,
      name
    })
  }

  // And check for a row callback.
  if (spec?.spec?.rowCallback !== null) {
    _bindCallback({
      context: this,
      callback: spec.spec.rowCallback,
      binder: shim?.bindRowCallbackSegment || shim?.bindCallbackSegment?.bind(shim, spec.spec),
      shim,
      fn,
      args,
      spec,
      name
    })
  }
}
Binds all callbacks identified in the given spec.

The callbacks are bound using the method meant for that type if available
(i.e. `bindRowCallbackSegment` for `rowCallback`), but will fall back to the
generic callback binding method, `bindCallbackSegment`, otherwise.

@this *
@private
@param {Shim} shim
 The shim performing this binding.
@param {Function} fn
 The function the spec describes.
@param {string} name
 The name of the function the spec describes.
@param {Array} args
 The arguments to be passed into `fn`.
@param {object} spec
 The specification for bind the callbacks.
@param {SegmentSpec} spec.spec
 The segment specification for the function we're pulling callbacks out of.
@param {TraceSegment} spec.segment
 The segment measuring the function which will be the parent of any callback
 segments that may be created.
@param {boolean} spec.shouldCreateSegment
 Flag indicating if we should create segments for the callbacks. We almost
 always do, but in the special case of nested internal methods we do not.