src/wtf/trace/providers/webglprovider.js
function wrapInstancedArraysExtension(ctx, proto) {
    /**
     * @param {string} signature Event signature.
     * @param {Function=} opt_generator Generator function.
     */
    function wrapInstancedArraysMethod(signature, opt_generator) {
      wrapMethod(
          proto, 'ANGLEInstancedArrays',
          signature, opt_generator);
    };

    wrapInstancedArraysMethod(
        'drawArraysInstancedANGLE(uint32 mode, uint32 first, int32 count, ' +
            'int32 primcount)',
        function(fn, eventType) {
          return function drawArraysInstancedANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
    wrapInstancedArraysMethod(
        'drawElementsInstancedANGLE(uint32 mode, int32 count, uint32 type, ' +
            'uint32 offset, int32 primcount)',
        function(fn, eventType) {
          return function drawElementsInstancedANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
    wrapInstancedArraysMethod(
        'vertexAttribDivisorANGLE(uint32 index, uint32 divisor)',
        function(fn, eventType) {
          return function vertexAttribDivisorANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
  }
function wrapInstancedArraysExtension(ctx, proto) {
    /**
     * @param {string} signature Event signature.
     * @param {Function=} opt_generator Generator function.
     */
    function wrapInstancedArraysMethod(signature, opt_generator) {
      wrapMethod(
          proto, 'ANGLEInstancedArrays',
          signature, opt_generator);
    };

    wrapInstancedArraysMethod(
        'drawArraysInstancedANGLE(uint32 mode, uint32 first, int32 count, ' +
            'int32 primcount)',
        function(fn, eventType) {
          return function drawArraysInstancedANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
    wrapInstancedArraysMethod(
        'drawElementsInstancedANGLE(uint32 mode, int32 count, uint32 type, ' +
            'uint32 offset, int32 primcount)',
        function(fn, eventType) {
          return function drawElementsInstancedANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
    wrapInstancedArraysMethod(
        'vertexAttribDivisorANGLE(uint32 index, uint32 divisor)',
        function(fn, eventType) {
          return function vertexAttribDivisorANGLE() {
            setCurrentContext(ctx);
            var scope = eventType.apply(this, arguments);
            return leaveScope(scope, fn.apply(this, arguments));
          };
        });
  }
function wrapInstancedArraysExtension ( ctx , proto ) { /**
     * @param {string} signature Event signature.
     * @param {Function=} opt_generator Generator function.
     */ function wrapInstancedArraysMethod ( signature , opt_generator ) { wrapMethod ( proto , 'ANGLEInstancedArrays' , signature , opt_generator ) ; } ; wrapInstancedArraysMethod ( 'drawArraysInstancedANGLE(uint32 mode, uint32 first, int32 count, ' + 'int32 primcount)' , function ( fn , eventType ) { return function drawArraysInstancedANGLE ( ) { setCurrentContext ( ctx ) ; var scope = eventType . apply ( this , arguments ) ; return leaveScope ( scope , fn . apply ( this , arguments ) ) ; } ; } ) ; wrapInstancedArraysMethod ( 'drawElementsInstancedANGLE(uint32 mode, int32 count, uint32 type, ' + 'uint32 offset, int32 primcount)' , function ( fn , eventType ) { return function drawElementsInstancedANGLE ( ) { setCurrentContext ( ctx ) ; var scope = eventType . apply ( this , arguments ) ; return leaveScope ( scope , fn . apply ( this , arguments ) ) ; } ; } ) ; wrapInstancedArraysMethod ( 'vertexAttribDivisorANGLE(uint32 index, uint32 divisor)' , function ( fn , eventType ) { return function vertexAttribDivisorANGLE ( ) { setCurrentContext ( ctx ) ; var scope = eventType . apply ( this , arguments ) ; return leaveScope ( scope , fn . apply ( this , arguments ) ) ; } ; } ) ; }
Wraps the ANGLEInstancedArrays extension object.
@param {!WebGLRenderingContext} ctx Target context.
@param {!Object} proto Prototype object.
Wraps the ANGLEInstancedArrays extension object .