code: function computeStackTrace(ex, depth) {
          var stack = null;
          depth = (depth == null ? 0 : +depth);
  
          try {
              // This must be tried first because Opera 10 *destroys*
              // its stacktrace property if you try to access the stack
              // property first!!
              stack = computeStackTraceFromStacktraceProp(ex);
              if (stack) {
                  return stack;
              }
          } catch (e) {
              if (debug) {
                  throw e;
              }
          }
  
          try {
              stack = computeStackTraceFromStackProp(ex);
              if (stack) {
                  return stack;
              }
          } catch (e) {
              if (debug) {
                  throw e;
              }
          }
  
          try {
              stack = computeStackTraceFromOperaMultiLineMessage(ex);
              if (stack) {
                  return stack;
              }
          } catch (e) {
              if (debug) {
                  throw e;
              }
          }
  
          try {
              stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);
              if (stack) {
                  return stack;
              }
          } catch (e) {
              if (debug) {
                  throw e;
              }
          }
  
          return {
              'mode': 'failed'
          };
      }
docs: Computes a stack trace for an exception.
  @param {Error} ex
  @param {(string|number)=} depth