@@ -23,16 +23,15 @@ const {
23
23
ObjectKeys,
24
24
ObjectValues,
25
25
Promise,
26
- PromiseAll,
27
26
PromisePrototypeCatch,
28
27
PromisePrototypeThen,
29
28
PromiseResolve,
30
29
ReflectGetOwnPropertyDescriptor,
31
30
ReflectOwnKeys,
32
31
RegExpPrototypeSymbolMatch,
33
32
RegExpPrototypeSymbolReplace,
34
- SafeArrayIterator,
35
33
SafeMap,
34
+ SafePromiseAll,
36
35
String,
37
36
StringFromCharCode,
38
37
StringPrototypeEndsWith,
@@ -519,22 +518,19 @@ function createRepl(inspector) {
519
518
}
520
519
521
520
loadScopes ( ) {
522
- return PromiseAll (
523
- new SafeArrayIterator ( ArrayPrototypeMap (
524
- ArrayPrototypeFilter (
525
- this . scopeChain ,
526
- ( scope ) => scope . type !== 'global'
527
- ) ,
528
- async ( scope ) => {
529
- const { objectId } = scope . object ;
530
- const { result } = await Runtime . getProperties ( {
531
- objectId,
532
- generatePreview : true ,
533
- } ) ;
534
- return new ScopeSnapshot ( scope , result ) ;
535
- } )
536
- )
537
- ) ;
521
+ return SafePromiseAll (
522
+ ArrayPrototypeFilter (
523
+ this . scopeChain ,
524
+ ( scope ) => scope . type !== 'global'
525
+ ) ,
526
+ async ( scope ) => {
527
+ const { objectId } = scope . object ;
528
+ const { result } = await Runtime . getProperties ( {
529
+ objectId,
530
+ generatePreview : true ,
531
+ } ) ;
532
+ return new ScopeSnapshot ( scope , result ) ;
533
+ } ) ;
538
534
}
539
535
540
536
list ( delta = 5 ) {
@@ -661,8 +657,7 @@ function createRepl(inspector) {
661
657
( error ) => `<${ error . message } >` ) ;
662
658
const lastIndex = watchedExpressions . length - 1 ;
663
659
664
- const values = await PromiseAll ( new SafeArrayIterator (
665
- ArrayPrototypeMap ( watchedExpressions , inspectValue ) ) ) ;
660
+ const values = await SafePromiseAll ( watchedExpressions , inspectValue ) ;
666
661
const lines = ArrayPrototypeMap ( watchedExpressions , ( expr , idx ) => {
667
662
const prefix = `${ leftPad ( idx , ' ' , lastIndex ) } : ${ expr } =` ;
668
663
const value = inspect ( values [ idx ] ) ;
@@ -866,7 +861,7 @@ function createRepl(inspector) {
866
861
location . lineNumber + 1 ) ) ;
867
862
if ( ! newBreakpoints . length ) return PromiseResolve ( ) ;
868
863
return PromisePrototypeThen (
869
- PromiseAll ( new SafeArrayIterator ( newBreakpoints ) ) ,
864
+ SafePromiseAll ( newBreakpoints ) ,
870
865
( results ) => {
871
866
print ( `${ results . length } breakpoints restored.` ) ;
872
867
} ) ;
@@ -902,8 +897,7 @@ function createRepl(inspector) {
902
897
903
898
inspector . suspendReplWhile ( ( ) =>
904
899
PromisePrototypeThen (
905
- PromiseAll ( new SafeArrayIterator (
906
- [ formatWatchers ( true ) , selectedFrame . list ( 2 ) ] ) ) ,
900
+ SafePromiseAll ( [ formatWatchers ( true ) , selectedFrame . list ( 2 ) ] ) ,
907
901
( { 0 : watcherList , 1 : context } ) => {
908
902
const breakContext = watcherList ?
909
903
`${ watcherList } \n${ inspect ( context ) } ` :
0 commit comments