Bug 185943

Summary: [JSC] ArrayPatternNode::emitDirectBinding does not return assignment target value if dst is nullptr
Product: WebKit Reporter: gfablima
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: fpizlo, isol2, mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Bug Depends on:    
Bug Blocks: 187085    
Attachments:
Description Flags
Patch
none
Patch mark.lam: review+

gfablima
Reported 2018-05-24 06:09:41 PDT
Hi everyone, it was observed that javascriptcore have unexpected behaviour when I'm trying to return a destructuring list inside a function. OS: Ubuntu 16.04 x64 Version: 606.1.9.4 Steps to reproduce: function test (){ return ( [a,b,] = [1, 2] ); } print( [a,b,] = [1, 2] ) print( test() ) Actual Results: - 1,2 - undefined Expected Results: - 1,2 - 1,2 Notes: V8, Chakra and SpiderMonkey works as expected.
Attachments
Patch (3.53 KB, patch)
2018-06-26 23:56 PDT, Yusuke Suzuki
no flags
Patch (3.92 KB, patch)
2018-06-27 02:58 PDT, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2018-06-26 23:56:17 PDT
Yusuke Suzuki
Comment 2 2018-06-27 02:58:00 PDT
Mark Lam
Comment 3 2018-06-27 03:04:20 PDT
Comment on attachment 343706 [details] Patch r=me
Yusuke Suzuki
Comment 4 2018-06-27 03:05:56 PDT
Radar WebKit Bug Importer
Comment 5 2018-06-27 03:06:22 PDT
isol2
Comment 6 2018-08-08 09:01:35 PDT
cinfuzz
Note You need to log in before you can comment on or make changes to this bug.