lib/third_party/tracing/model/slice_group.js
function(category, title, ts, opt_args, opt_tts,
                         opt_argsStripped, opt_colorId) {
      if (this.openPartialSlices_.length) {
        var prevSlice = this.openPartialSlices_[
            this.openPartialSlices_.length - 1];
        if (ts < prevSlice.start)
          throw new Error('Slices must be added in increasing timestamp order');
      }

      var colorId = opt_colorId ||
          ColorScheme.getColorIdForGeneralPurposeString(title);
      var slice = new this.sliceConstructor(category, title, colorId, ts,
                                            opt_args ? opt_args : {}, null,
                                            opt_tts, undefined,
                                            opt_argsStripped);
      this.openPartialSlices_.push(slice);
      slice.didNotFinish = true;
      this.pushSlice(slice);

      return slice;
    }
function(category, title, ts, opt_args, opt_tts,
                         opt_argsStripped, opt_colorId) {
      if (this.openPartialSlices_.length) {
        var prevSlice = this.openPartialSlices_[
            this.openPartialSlices_.length - 1];
        if (ts < prevSlice.start)
          throw new Error('Slices must be added in increasing timestamp order');
      }

      var colorId = opt_colorId ||
          ColorScheme.getColorIdForGeneralPurposeString(title);
      var slice = new this.sliceConstructor(category, title, colorId, ts,
                                            opt_args ? opt_args : {}, null,
                                            opt_tts, undefined,
                                            opt_argsStripped);
      this.openPartialSlices_.push(slice);
      slice.didNotFinish = true;
      this.pushSlice(slice);

      return slice;
    }
function ( category , title , ts , opt_args , opt_tts , opt_argsStripped , opt_colorId ) { if ( this . openPartialSlices_ . length ) { var prevSlice = this . openPartialSlices_ [ this . openPartialSlices_ . length - 1 ] ; if ( ts < prevSlice . start ) throw new Error ( 'Slices must be added in increasing timestamp order' ) ; } var colorId = opt_colorId || ColorScheme . getColorIdForGeneralPurposeString ( title ) ; var slice = new this . sliceConstructor ( category , title , colorId , ts , opt_args ? opt_args : { } , null , opt_tts , undefined , opt_argsStripped ) ; this . openPartialSlices_ . push ( slice ) ; slice . didNotFinish = true ; this . pushSlice ( slice ) ; return slice ; }
Opens a new slice in the group's slices.

Calls to beginSlice and
endSlice must be made with non-monotonically-decreasing timestamps.

@param {String} category Category name of the slice to add.
@param {String} title Title of the slice to add.
@param {Number} ts The timetsamp of the slice, in milliseconds.
@param {Object.<string, Object>=} opt_args Arguments associated with
the slice.
@param {Number=} opt_colorId The color of the slice, defined by
its palette id (see ui/base/color_scheme.html).
Opens a new slice in the group s slices .