Bug 1636306 Comment 1 Edit History

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

```js
oomTest(() => { eval(`
    function getCallee() { return getCallee.caller; }

    // Use trickery to get a reference to a run-once function. We avoid
    // expanding the lazy inner functions in this first invocation.
    let fn = function(x) {
        if (x) {
            // Singletons inside lazy
            let _ = function() {
                function x00() {}
                function x01() {}
                function x02() {}
                function x03() {}
                function x04() {}
                function x05() {}
                function x06() {}
                function x07() {}
                function x08() {}
                function x09() {}
            }();
        }

        return getCallee();
    }(false);

    // Run `fn` but expand inner-lazy this time. Run in a loop to expand 
    for (var i = 0; i < 2; i += 1) {
        try { fn(true); }
        catch (e) { }
    }
`)});
```

This triggers the following debug assert:
`Assertion failure: !obj->isSingleton(), at /home/tcampbell/projects/gecko.dev/js/src/vm/ObjectGroup-inl.h:108`
```js
oomTest(() => { eval(`
    function getCallee() { return getCallee.caller; }

    // Use trickery to get a reference to a run-once function. We avoid
    // expanding the lazy inner functions in this first invocation.
    let fn = function(x) {
        if (x) {
            // Singletons inside lazy
            let _ = function() {
                function x00() {}
                function x01() {}
                function x02() {}
                function x03() {}
                function x04() {}
                function x05() {}
                function x06() {}
                function x07() {}
                function x08() {}
                function x09() {}
            }();
        }

        return getCallee();
    }(false);

    // Run fn but expand inner-lazy this time. Run in a loop to expand 
    for (var i = 0; i < 2; i += 1) {
        try { fn(true); }
        catch (e) { }
    }
`)});
```

This triggers the following debug assert:
`Assertion failure: !obj->isSingleton(), at /home/tcampbell/projects/gecko.dev/js/src/vm/ObjectGroup-inl.h:108`

Back to Bug 1636306 Comment 1