[Webkit-unassigned] [Bug 185130] New: Inconsistence when try to access an property inside the "with" scope

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 30 05:10:22 PDT 2018


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

            Bug ID: 185130
           Summary: Inconsistence when try to access an property inside
                    the "with" scope
           Product: WebKit
           Version: Safari 11
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gfablima at gmail.com

Hi, 
there's an inconsistence when we try to access an property inside the "with" scope.

OS: Ubuntu 16.04 x64
JavascriptCore (tag): 606.1.9.4

Step to reproduce:
```
var o = { f: "foo" };
with (o) {
  var desc = Object.getOwnPropertyDescriptor(this, "f");
  function f() {
    return "bar";
  }
  if (!(desc.value === undefined)) {
    throw new Error('expected: undefined, got: ' + desc.value);
  }
}
```
Actual results:
Error: expected: undefined, got: function f() {
  return "bar";
}

Expected results:
Pass without failures

V8 and Spidermonkey pass as expected, but Chakra and JavascriptCore returns the function f() inside "with" scope.

-- 
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/20180430/9ca97c57/attachment.html>


More information about the webkit-unassigned mailing list