Bug 185130

Summary: Inconsistency when try to access an property inside the "with" scope
Product: WebKit Reporter: gfablima
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: isol2
Priority: P2    
Version: Safari 11   
Hardware: PC   
OS: Linux   

gfablima
Reported 2018-04-30 05:10:22 PDT
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.
Attachments
isol2
Comment 1 2018-08-23 18:03:10 PDT
cinfuzz
Note You need to log in before you can comment on or make changes to this bug.