File tree 3 files changed +4
-11
lines changed
3 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,8 @@ class PDFWorkerStream {
40
40
}
41
41
42
42
cancelAllRequests ( reason ) {
43
- if ( this . _fullRequestReader ) {
44
- this . _fullRequestReader . cancel ( reason ) ;
45
- }
43
+ this . _fullRequestReader ?. cancel ( reason ) ;
44
+
46
45
for ( const reader of this . _rangeRequestReaders . slice ( 0 ) ) {
47
46
reader . cancel ( reason ) ;
48
47
}
Original file line number Diff line number Diff line change @@ -3153,11 +3153,7 @@ class PDFObjects {
3153
3153
* @returns {Object }
3154
3154
*/
3155
3155
#ensureObj( objId ) {
3156
- const obj = this . #objs[ objId ] ;
3157
- if ( obj ) {
3158
- return obj ;
3159
- }
3160
- return ( this . #objs[ objId ] = {
3156
+ return ( this . #objs[ objId ] ||= {
3161
3157
capability : new PromiseCapability ( ) ,
3162
3158
data : null ,
3163
3159
} ) ;
Original file line number Diff line number Diff line change @@ -107,9 +107,7 @@ class Sandbox {
107
107
}
108
108
109
109
dumpMemoryUse ( ) {
110
- if ( this . _module ) {
111
- this . _module . ccall ( "dumpMemoryUse" , null , [ ] ) ;
112
- }
110
+ this . _module ?. ccall ( "dumpMemoryUse" , null , [ ] ) ;
113
111
}
114
112
115
113
nukeSandbox ( ) {
You can’t perform that action at this time.
0 commit comments