@@ -256,7 +256,6 @@ TraceKit.report = (function reportModuleWrapper() {
256
256
* TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
257
257
*
258
258
* Syntax:
259
- * s = TraceKit.computeStackTrace.ofCaller([depth])
260
259
* s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
261
260
* Returns:
262
261
* s.name - exception name
@@ -304,19 +303,6 @@ TraceKit.report = (function reportModuleWrapper() {
304
303
* exceptions (because your catch block will likely be far away from the
305
304
* inner function that actually caused the exception).
306
305
*
307
- * Tracing example:
308
- * function trace(message) {
309
- * var stackInfo = TraceKit.computeStackTrace.ofCaller();
310
- * var data = message + "\n";
311
- * for(var i in stackInfo.stack) {
312
- * var item = stackInfo.stack[i];
313
- * data += (item.func || '[anonymous]') + "() in " + item.url + ":" + (item.line || '0') + "\n";
314
- * }
315
- * if (window.console)
316
- * console.info(data);
317
- * else
318
- * alert(data);
319
- * }
320
306
*/
321
307
TraceKit . computeStackTrace = ( function computeStackTraceWrapper ( ) {
322
308
var debug = false ,
@@ -1049,25 +1035,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
1049
1035
return { } ;
1050
1036
}
1051
1037
1052
- /**
1053
- * Logs a stacktrace starting from the previous call and working down.
1054
- * @param {(number|string)= } depth How many frames deep to trace.
1055
- * @return {Object.<string, *> } Stack trace information.
1056
- */
1057
- function computeStackTraceOfCaller ( depth ) {
1058
- depth = ( depth == null ? 0 : + depth ) + 1 ; // "+ 1" because "ofCaller" should drop one frame
1059
- try {
1060
- throw new Error ( ) ;
1061
- } catch ( ex ) {
1062
- return computeStackTrace ( ex , depth + 1 ) ;
1063
- }
1064
- }
1065
-
1066
1038
computeStackTrace . augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement ;
1067
1039
computeStackTrace . computeStackTraceFromStackProp = computeStackTraceFromStackProp ;
1068
1040
computeStackTrace . guessFunctionName = guessFunctionName ;
1069
1041
computeStackTrace . gatherContext = gatherContext ;
1070
- computeStackTrace . ofCaller = computeStackTraceOfCaller ;
1071
1042
1072
1043
return computeStackTrace ;
1073
1044
} ( ) ) ;
0 commit comments