File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ export const featureNames = [
14
14
'fingerprintingTemporaryStorage' ,
15
15
'navigatorInterface' ,
16
16
'clickToLoad' ,
17
- 'elementHiding'
17
+ 'elementHiding' ,
18
+ 'exceptionHandler'
18
19
]
19
20
20
21
// Certain features are injected into the page in Firefox
Original file line number Diff line number Diff line change
1
+ import { postDebugMessage } from '../utils.js'
2
+ import ContentFeature from '../content-feature.js'
3
+
4
+ export default class ExceptionHandler extends ContentFeature {
5
+ init ( ) {
6
+ // Report to the debugger panel if an uncaught exception occurs
7
+ function handleUncaughtException ( e ) {
8
+ postDebugMessage ( 'jsException' , {
9
+ documentUrl : document . location . href ,
10
+ message : e . message ,
11
+ filename : e . filename ,
12
+ lineno : e . lineno ,
13
+ colno : e . colno ,
14
+ stack : e . error . stack
15
+ } )
16
+ }
17
+ globalThis . addEventListener ( 'error' , handleUncaughtException )
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments