File tree 2 files changed +8
-15
lines changed
2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 2
2
3
3
const {
4
4
ObjectDefineProperties,
5
+ ObjectDefineProperty,
5
6
SymbolToStringTag,
6
7
} = primordials ;
7
8
@@ -47,11 +48,13 @@ const isCountQueuingStrategy =
47
48
* }} QueuingStrategy
48
49
*/
49
50
50
- // eslint-disable-next-line func-name-matching,func-style
51
- const byteSizeFunction = function size ( chunk ) { return chunk . byteLength ; } ;
52
-
53
- // eslint-disable-next-line func-name-matching,func-style
54
- const countSizeFunction = function size ( ) { return 1 ; } ;
51
+ const nameDescriptor = { __proto__ : null , value : 'size' } ;
52
+ const byteSizeFunction = ObjectDefineProperty (
53
+ ( chunk ) => chunk . byteLength ,
54
+ 'name' ,
55
+ nameDescriptor
56
+ ) ;
57
+ const countSizeFunction = ObjectDefineProperty ( ( ) => 1 , 'name' , nameDescriptor ) ;
55
58
56
59
/**
57
60
* @type {QueuingStrategy }
Original file line number Diff line number Diff line change 2
2
"queuing-strategies-size-function-per-global.window.js" : {
3
3
"skip" : " Browser-specific test"
4
4
},
5
- "queuing-strategies.any.js" : {
6
- "fail" : {
7
- "expected" : [
8
- " CountQueuingStrategy: size should not have a prototype property" ,
9
- " ByteLengthQueuingStrategy: size should not have a prototype property" ,
10
- " CountQueuingStrategy: size should not be a constructor" ,
11
- " ByteLengthQueuingStrategy: size should not be a constructor"
12
- ]
13
- }
14
- },
15
5
"readable-streams/cross-realm-crash.window.js" : {
16
6
"skip" : " Browser-specific test"
17
7
},
You can’t perform that action at this time.
0 commit comments