[Webkit-unassigned] [Bug 209571] New: Function.length broken by Object.defineProperty and bind
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 25 16:32:50 PDT 2020
https://bugs.webkit.org/show_bug.cgi?id=209571
Bug ID: 209571
Summary: Function.length broken by Object.defineProperty and
bind
Product: WebKit
Version: Safari Technology Preview
Hardware: Macintosh
OS: macOS 10.15
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: andy.niccolai at gmail.com
With the release of Safari 13.1 (and also verified in 13.2 Technical Preview), Function.length always returns zero after binding arguments to a function that has a custom name defined.
Repro JS Fiddle: https://jsfiddle.net/7s9yop23/
Repro code
const originalFn = (a, b) => a + b;
Object.defineProperty(originalFn, 'name', {value: 'newFunctionName'});
const renamedAndBoundFn = originalFn.bind(undefined, 1);
// expected: 1
// actual: 0
renamedAndBoundFn.length
--
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/20200325/1184fc8f/attachment-0001.htm>
More information about the webkit-unassigned
mailing list