| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4515a28 commit c8e1782
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 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(/Array buffer allocation failed/)) { | ||
| 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 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments