[Webkit-unassigned] [Bug 164582] New: [JSC] Default parameter part should be retrieved by op_get_argument opcode instead of changing parity

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 9 23:46:46 PST 2016


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

            Bug ID: 164582
           Summary: [JSC] Default parameter part should be retrieved by
                    op_get_argument opcode instead of changing parity
    Classification: Unclassified
           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: utatane.tea at gmail.com

If you have a function like,

function func(a, b, options = {}) {
...
}

`func.length` is 2. But the number of parameters of this function is counted as 3.
So if you call it with the form `func(a, b)`, the arity check always fails.
But in the above case, not passing options is common.

Instead, we should retrieve the argument by using `op_get_argument`. It does not increase the arity.

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


More information about the webkit-unassigned mailing list