@@ -118,24 +118,30 @@ export class LogManager {
118
118
) ;
119
119
for ( const browsingContext of realm . associatedBrowsingContexts ) {
120
120
this . #eventManager. registerPromiseEvent (
121
- argsPromise . then ( ( args ) => ( {
122
- kind : 'success' ,
123
- value : {
124
- type : 'event' ,
125
- method : ChromiumBidi . Log . EventNames . LogEntryAdded ,
126
- params : {
127
- level : getLogLevel ( params . type ) ,
128
- source : realm . source ,
129
- text : getRemoteValuesText ( args , true ) ,
130
- timestamp : Math . round ( params . timestamp ) ,
131
- stackTrace : getBidiStackTrace ( params . stackTrace ) ,
132
- type : 'console' ,
133
- // Console method is `warn`, not `warning`.
134
- method : params . type === 'warning' ? 'warn' : params . type ,
135
- args,
121
+ argsPromise . then (
122
+ ( args ) => ( {
123
+ kind : 'success' ,
124
+ value : {
125
+ type : 'event' ,
126
+ method : ChromiumBidi . Log . EventNames . LogEntryAdded ,
127
+ params : {
128
+ level : getLogLevel ( params . type ) ,
129
+ source : realm . source ,
130
+ text : getRemoteValuesText ( args , true ) ,
131
+ timestamp : Math . round ( params . timestamp ) ,
132
+ stackTrace : getBidiStackTrace ( params . stackTrace ) ,
133
+ type : 'console' ,
134
+ // Console method is `warn`, not `warning`.
135
+ method : params . type === 'warning' ? 'warn' : params . type ,
136
+ args,
137
+ } ,
136
138
} ,
137
- } ,
138
- } ) ) ,
139
+ } ) ,
140
+ ( error ) => ( {
141
+ kind : 'error' ,
142
+ error,
143
+ } )
144
+ ) ,
139
145
browsingContext . id ,
140
146
ChromiumBidi . Log . EventNames . LogEntryAdded
141
147
) ;
0 commit comments