Skip to content

Commit d2f9c34

Browse files
committed
Remove an unused function from TraceKit
1 parent 3ceae83 commit d2f9c34

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

vendor/TraceKit/tracekit.js

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ TraceKit.report = (function reportModuleWrapper() {
256256
* TraceKit.computeStackTrace: cross-browser stack traces in JavaScript
257257
*
258258
* Syntax:
259-
* s = TraceKit.computeStackTrace.ofCaller([depth])
260259
* s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)
261260
* Returns:
262261
* s.name - exception name
@@ -304,19 +303,6 @@ TraceKit.report = (function reportModuleWrapper() {
304303
* exceptions (because your catch block will likely be far away from the
305304
* inner function that actually caused the exception).
306305
*
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-
* }
320306
*/
321307
TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
322308
var debug = false,
@@ -1049,25 +1035,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
10491035
return {};
10501036
}
10511037

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-
10661038
computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;
10671039
computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;
10681040
computeStackTrace.guessFunctionName = guessFunctionName;
10691041
computeStackTrace.gatherContext = gatherContext;
1070-
computeStackTrace.ofCaller = computeStackTraceOfCaller;
10711042

10721043
return computeStackTrace;
10731044
}());

0 commit comments

Comments
 (0)