Skip to content

Commit e1c1cc7

Browse files
committed
Get rid of some useless information
1 parent c0b7b5b commit e1c1cc7

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

vendor/TraceKit/tracekit.js

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,9 @@ TraceKit.report = (function reportModuleWrapper() {
165165
location.func = TraceKit.computeStackTrace.guessFunctionName(location.url, location.line);
166166
location.context = TraceKit.computeStackTrace.gatherContext(location.url, location.line);
167167
stack = {
168-
'mode': 'onerror',
169168
'message': message,
170169
'url': document.location.href,
171-
'stack': [location],
172-
'useragent': navigator.userAgent
170+
'stack': [location]
173171
};
174172
notifyHandlers(stack, true);
175173
}
@@ -268,7 +266,6 @@ TraceKit.report = (function reportModuleWrapper() {
268266
* s.stack[i].line - line number, if known
269267
* s.stack[i].column - column number, if known
270268
* s.stack[i].context - an array of source code lines; the middle element corresponds to the correct line#
271-
* s.mode - 'stack', 'stacktrace', 'multiline', 'callers', 'onerror', or 'failed' -- method used to collect the stack trace
272269
*
273270
* Supports:
274271
* - Firefox: full stack trace with line numbers and unreliable column
@@ -685,12 +682,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
685682
}
686683

687684
return {
688-
'mode': 'stack',
689685
'name': ex.name,
690686
'message': ex.message,
691687
'url': document.location.href,
692-
'stack': stack,
693-
'useragent': navigator.userAgent
688+
'stack': stack
694689
};
695690
}
696691

@@ -743,12 +738,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
743738
}
744739

745740
return {
746-
'mode': 'stacktrace',
747741
'name': ex.name,
748742
'message': ex.message,
749743
'url': document.location.href,
750-
'stack': stack,
751-
'useragent': navigator.userAgent
744+
'stack': stack
752745
};
753746
}
754747

@@ -855,12 +848,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
855848
}
856849

857850
return {
858-
'mode': 'multiline',
859851
'name': ex.name,
860852
'message': lines[0],
861853
'url': document.location.href,
862-
'stack': stack,
863-
'useragent': navigator.userAgent
854+
'stack': stack
864855
};
865856
}
866857

@@ -988,12 +979,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
988979
}
989980

990981
var result = {
991-
'mode': 'callers',
992982
'name': ex.name,
993983
'message': ex.message,
994984
'url': document.location.href,
995-
'stack': stack,
996-
'useragent': navigator.userAgent
985+
'stack': stack
997986
};
998987
augmentStackTraceWithInitialElement(result, ex.sourceURL || ex.fileName, ex.line || ex.lineNumber, ex.message || ex.description);
999988
return result;
@@ -1055,9 +1044,7 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
10551044
}
10561045
}
10571046

1058-
return {
1059-
'mode': 'failed'
1060-
};
1047+
return {};
10611048
}
10621049

10631050
/**

0 commit comments

Comments
 (0)