@@ -80,18 +80,18 @@ TraceKit.report = (function reportModuleWrapper() {
8080 lastExceptionStack = null ;
8181
8282 /**
83- * Add a crash handler.
84- * @param {Function } handler
85- */
83+ * Add a crash handler.
84+ * @param {Function } handler
85+ */
8686 function subscribe ( handler ) {
8787 installGlobalHandler ( ) ;
8888 handlers . push ( handler ) ;
8989 }
9090
9191 /**
92- * Remove a crash handler.
93- * @param {Function } handler
94- */
92+ * Remove a crash handler.
93+ * @param {Function } handler
94+ */
9595 function unsubscribe ( handler ) {
9696 for ( var i = handlers . length - 1 ; i >= 0 ; -- i ) {
9797 if ( handlers [ i ] === handler ) {
@@ -101,17 +101,17 @@ TraceKit.report = (function reportModuleWrapper() {
101101 }
102102
103103 /**
104- * Remove all crash handlers.
105- */
104+ * Remove all crash handlers.
105+ */
106106 function unsubscribeAll ( ) {
107107 uninstallGlobalHandler ( ) ;
108108 handlers = [ ] ;
109109 }
110110
111111 /**
112- * Dispatch stack information to all handlers.
113- * @param {Object.<string, *> } stack
114- */
112+ * Dispatch stack information to all handlers.
113+ * @param {Object.<string, *> } stack
114+ */
115115 function notifyHandlers ( stack , isWindowError ) {
116116 var exception = null ;
117117 if ( isWindowError && ! TraceKit . collectWindowErrors ) {
@@ -135,16 +135,16 @@ TraceKit.report = (function reportModuleWrapper() {
135135 var _oldOnerrorHandler , _onErrorHandlerInstalled ;
136136
137137 /**
138- * Ensures all global unhandled exceptions are recorded.
139- * Supported by Gecko and IE.
140- * @param {string } msg Error message.
141- * @param {string } url URL of script that generated the exception.
142- * @param {(number|string) } lineNo The line number at which the error
143- * occurred.
144- * @param {?(number|string) } colNo The column number at which the error
145- * occurred.
146- * @param {?Error } ex The actual Error object.
147- */
138+ * Ensures all global unhandled exceptions are recorded.
139+ * Supported by Gecko and IE.
140+ * @param {string } msg Error message.
141+ * @param {string } url URL of script that generated the exception.
142+ * @param {(number|string) } lineNo The line number at which the error
143+ * occurred.
144+ * @param {?(number|string) } colNo The column number at which the error
145+ * occurred.
146+ * @param {?Error } ex The actual Error object.
147+ */
148148 function traceKitWindowOnError ( msg , url , lineNo , colNo , ex ) {
149149 var stack = null ;
150150 // If 'ex' is ErrorEvent, get real Error from inside
@@ -232,12 +232,12 @@ TraceKit.report = (function reportModuleWrapper() {
232232 }
233233
234234 /**
235- * Reports an unhandled Error to TraceKit.
236- * @param {Error } ex
237- * @param {?boolean } rethrow If false, do not re-throw the exception.
238- * Only used for window.onerror to not cause an infinite loop of
239- * rethrowing.
240- */
235+ * Reports an unhandled Error to TraceKit.
236+ * @param {Error } ex
237+ * @param {?boolean } rethrow If false, do not re-throw the exception.
238+ * Only used for window.onerror to not cause an infinite loop of
239+ * rethrowing.
240+ */
241241 function report ( ex , rethrow ) {
242242 var args = _slice . call ( arguments , 1 ) ;
243243 if ( lastExceptionStack ) {
@@ -364,16 +364,16 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
364364 // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'
365365
366366 /**
367- * Computes stack trace information from the stack property.
368- * Chrome and Gecko use this property.
369- * @param {Error } ex
370- * @return {?Object.<string, *> } Stack trace information.
371- */
367+ * Computes stack trace information from the stack property.
368+ * Chrome and Gecko use this property.
369+ * @param {Error } ex
370+ * @return {?Object.<string, *> } Stack trace information.
371+ */
372372 function computeStackTraceFromStackProp ( ex ) {
373373 if ( typeof ex . stack === 'undefined' || ! ex . stack ) return ;
374374
375- var chrome = / ^ \s * a t ( .* ?) ? \( ( (?: f i l e | h t t p s ? | b l o b | c h r o m e - e x t e n s i o n | n a t i v e | e v a l | w e b p a c k | < a n o n y m o u s > | [ a - z ] : | \/ ) .* ?) (?: : ( \d + ) ) ? (?: : ( \d + ) ) ? \) ? \s * $ / i,
376- gecko = / ^ \s * ( .* ?) (?: \( ( .* ?) \) ) ? (?: ^ | @ ) ( (?: f i l e | h t t p s ? | b l o b | c h r o m e | w e b p a c k | r e s o u r c e | \[ n a t i v e ) .* ?| [ ^ @ ] * b u n d l e ) (?: : ( \d + ) ) ? (?: : ( \d + ) ) ? \s * $ / i,
375+ var chrome = / ^ \s * a t (?: ( .* ?) ? \( ) ? ( (?: f i l e | h t t p s ? | b l o b | c h r o m e - e x t e n s i o n | n a t i v e | e v a l | w e b p a c k | < a n o n y m o u s > | [ a - z ] : | \/ ) .* ?) (?: : ( \d + ) ) ? (?: : ( \d + ) ) ? \) ? \s * $ / i,
376+ gecko = / ^ \s * ( .* ?) (?: \( ( .* ?) \) ) ? (?: ^ | @ ) ( (?: f i l e | h t t p s ? | b l o b | c h r o m e | w e b p a c k | r e s o u r c e | m o z - e x t e n s i o n | \[ n a t i v e ) .* ?| [ ^ @ ] * b u n d l e ) (?: : ( \d + ) ) ? (?: : ( \d + ) ) ? \s * $ / i,
377377 winjs = / ^ \s * a t (?: ( (?: \[ o b j e c t o b j e c t \] ) ? .+ ) ) ? \( ? ( (?: f i l e | m s - a p p x (?: - w e b ) | h t t p s ? | w e b p a c k | b l o b ) : .* ?) : ( \d + ) (?: : ( \d + ) ) ? \) ? \s * $ / i,
378378 // Used to additionally parse URL/line/column from eval frames
379379 geckoEval = / ( \S + ) l i n e ( \d + ) (?: > e v a l l i n e \d + ) * > e v a l / i,
@@ -455,18 +455,18 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
455455 }
456456
457457 /**
458- * Adds information about the first frame to incomplete stack traces.
459- * Safari and IE require this to get complete data on the first frame.
460- * @param {Object.<string, *> } stackInfo Stack trace information from
461- * one of the compute* methods.
462- * @param {string } url The URL of the script that caused an error.
463- * @param {(number|string) } lineNo The line number of the script that
464- * caused an error.
465- * @param {string= } message The error generated by the browser, which
466- * hopefully contains the name of the object that caused the error.
467- * @return {boolean } Whether or not the stack information was
468- * augmented.
469- */
458+ * Adds information about the first frame to incomplete stack traces.
459+ * Safari and IE require this to get complete data on the first frame.
460+ * @param {Object.<string, *> } stackInfo Stack trace information from
461+ * one of the compute* methods.
462+ * @param {string } url The URL of the script that caused an error.
463+ * @param {(number|string) } lineNo The line number of the script that
464+ * caused an error.
465+ * @param {string= } message The error generated by the browser, which
466+ * hopefully contains the name of the object that caused the error.
467+ * @return {boolean } Whether or not the stack information was
468+ * augmented.
469+ */
470470 function augmentStackTraceWithInitialElement ( stackInfo , url , lineNo , message ) {
471471 var initial = {
472472 url : url ,
@@ -505,14 +505,14 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
505505 }
506506
507507 /**
508- * Computes stack trace information by walking the arguments.caller
509- * chain at the time the exception occurred. This will cause earlier
510- * frames to be missed but is the only way to get any stack trace in
511- * Safari and IE. The top frame is restored by
512- * {@link augmentStackTraceWithInitialElement}.
513- * @param {Error } ex
514- * @return {?Object.<string, *> } Stack trace information.
515- */
508+ * Computes stack trace information by walking the arguments.caller
509+ * chain at the time the exception occurred. This will cause earlier
510+ * frames to be missed but is the only way to get any stack trace in
511+ * Safari and IE. The top frame is restored by
512+ * {@link augmentStackTraceWithInitialElement}.
513+ * @param {Error } ex
514+ * @return {?Object.<string, *> } Stack trace information.
515+ */
516516 function computeStackTraceByWalkingCallerChain ( ex , depth ) {
517517 var functionName = / f u n c t i o n \s + ( [ _ $ a - z A - Z \xA0 - \uFFFF ] [ _ $ a - z A - Z 0 - 9 \xA0 - \uFFFF ] * ) ? \s * \( / i,
518518 stack = [ ] ,
@@ -582,10 +582,10 @@ TraceKit.computeStackTrace = (function computeStackTraceWrapper() {
582582 }
583583
584584 /**
585- * Computes a stack trace for an exception.
586- * @param {Error } ex
587- * @param {(string|number)= } depth
588- */
585+ * Computes a stack trace for an exception.
586+ * @param {Error } ex
587+ * @param {(string|number)= } depth
588+ */
589589 function computeStackTrace ( ex , depth ) {
590590 var stack = null ;
591591 depth = depth == null ? 0 : + depth ;
0 commit comments