[Webkit-unassigned] [Bug 171456] New: Deep nesting is leading to ReferenceError for hoisted function

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 28 15:43:29 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=171456

            Bug ID: 171456
           Summary: Deep nesting is leading to ReferenceError for hoisted
                    function
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gskachkov at gmail.com

function boo () {
    {
        function foo() {}
    }
    if (true) {
        {
            {
                {
                    {
                        {
                           {
                                {
                                    {
                                        {
                                            let x = 0;
                                            print(x);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    print(!!foo); // ReferenceError: Can't find variable: foo, but should be true
};
boo();

Error occurs because we do not copy hosting candidates when we increase buffer for scope stack, so we need to add , m_sloppyModeHoistableFunctionCandidates(WTFMove(other.m_sloppyModeHoistableFunctionCandidates)) to Scope constructor

This error present in latest Safari and STP

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170428/20678412/attachment.html>


More information about the webkit-unassigned mailing list