File tree 2 files changed +18
-6
lines changed
deps/v8/test/mjsunit/regress
2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 36
36
37
37
# Reset this number to 0 on major V8 upgrades.
38
38
# Increment by one for each non-official patch applied to deps/v8.
39
- 'v8_embedder_string' : '-node.10 ' ,
39
+ 'v8_embedder_string' : '-node.12 ' ,
40
40
41
41
##### V8 defaults for Node.js #####
42
42
Original file line number Diff line number Diff line change @@ -8,9 +8,21 @@ function foo(){
8
8
const xs = new Uint16Array ( 3775336418 ) ;
9
9
return xs [ - 981886074 ] ;
10
10
}
11
- % PrepareFunctionForOptimization ( foo ) ;
12
- foo ( ) ;
13
11
14
- assertEquals ( undefined , foo ( ) ) ;
15
- % OptimizeFunctionOnNextCall ( foo ) ;
16
- assertEquals ( undefined , foo ( ) ) ;
12
+ var skip = false ;
13
+ try {
14
+ new Uint16Array ( 3775336418 ) ;
15
+ } catch ( e ) {
16
+ if ( e . message . test ( / A r r a y b u f f e r a l l o c a t i o n f a i l e d / ) ) {
17
+ skip = true ; // We don't have enough memory, just skip the test.
18
+ }
19
+ }
20
+
21
+ if ( ! skip ) {
22
+ % PrepareFunctionForOptimization ( foo ) ;
23
+ foo ( ) ;
24
+
25
+ assertEquals ( undefined , foo ( ) ) ;
26
+ % OptimizeFunctionOnNextCall ( foo ) ;
27
+ assertEquals ( undefined , foo ( ) ) ;
28
+ }
You can’t perform that action at this time.
0 commit comments