[Webkit-unassigned] [Bug 188930] New: JSC should evaluate scoped function block after an eval statement

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 24 13:47:39 PDT 2018


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

            Bug ID: 188930
           Summary: JSC should evaluate scoped function block after an
                    eval statement
           Product: WebKit
           Version: Safari 11
          Hardware: Unspecified
                OS: iOS 10.3
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: srsj2 at cin.ufpe.br

Hi everyone,

I found out an inconsistency if we try to evaluate a scoped function block after an eval statement. If I remove the first line (eval line), JSC works as expected.

Version: 235318
O.S: MacOS High Sierra Version 10.13.6

step to reproduce:
eval("if (false) function _f() {} else function f() { return 1; }");
{
   function f() {
      return 2;
   }
}

print(f())

atual result: 
1

expected result:
2

V8, Chakra and SpiderMonkey works as expected 

cinfuzz

-- 
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/20180824/d98d370b/attachment.html>


More information about the webkit-unassigned mailing list