File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ const {
55
55
} = workerIo ;
56
56
const { deserializeError } = require ( 'internal/error_serdes' ) ;
57
57
const { fileURLToPath, isURLInstance, pathToFileURL } = require ( 'internal/url' ) ;
58
+ const { kEmptyObject } = require ( 'internal/util' ) ;
58
59
const { validateArray } = require ( 'internal/validators' ) ;
59
60
60
61
const {
@@ -118,7 +119,7 @@ function assignEnvironmentData(data) {
118
119
}
119
120
120
121
class Worker extends EventEmitter {
121
- constructor ( filename , options = { } ) {
122
+ constructor ( filename , options = kEmptyObject ) {
122
123
super ( ) ;
123
124
debug ( `[${ threadId } ] create new worker` , filename , options ) ;
124
125
if ( options . execArgv )
Original file line number Diff line number Diff line change @@ -18,7 +18,10 @@ const {
18
18
SymbolFor,
19
19
} = primordials ;
20
20
21
- const { kEnumerableProperty } = require ( 'internal/util' ) ;
21
+ const {
22
+ kEmptyObject,
23
+ kEnumerableProperty,
24
+ } = require ( 'internal/util' ) ;
22
25
23
26
const {
24
27
handle_onclose : handleOnCloseSymbol ,
@@ -123,7 +126,7 @@ class MessageEvent extends Event {
123
126
lastEventId = '' ,
124
127
source = null ,
125
128
ports = [ ] ,
126
- } = { } ) {
129
+ } = kEmptyObject ) {
127
130
super ( type ) ;
128
131
this [ kData ] = data ;
129
132
this [ kOrigin ] = `${ origin } ` ;
You can’t perform that action at this time.
0 commit comments