Bug 1666856 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

This asserts after 2 seconds for me in a debug build.

```js
let arr = [];
arr[10_000] = 1;

function f(limit) {
  if (limit > 0) {
    for (var key in arr) {
      f(limit - 1);
    }
  }
}

let success = false;
for (let n = 0; !success; n++) {
  try {
    oomAtAllocation(n);
    f(16);
    success = !resetOOMFailure();
  } catch (oom) {}
  gc();
}
```
This asserts after 2 seconds for me in a debug build.

```js
let arr = [];
arr[10000] = 1;

let success = false;
for (let n = 0; !success; n++) {
  try {
    oomAtAllocation(n);
    for (var key in arr) {}
    success = !resetOOMFailure();
  } catch (oom) {}
  gc();
}
```

Back to Bug 1666856 Comment 4