WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
141670
Descriptor of Function.arguments is inconsistent
https://bugs.webkit.org/show_bug.cgi?id=141670
Summary
Descriptor of Function.arguments is inconsistent
Joseph Pecoraro
Reported
2015-02-16 15:25:40 PST
* SUMMARY Descriptor of Function.arguments is inconsistent. Sometimes it is a value, sometimes it is a getter/setter. This doesn't seem expected. js> Object.getOwnPropertyDescriptor(function(){}, "arguments") < {value: null, writable: false, enumerable: false, configurable: false} js> Object.getOwnPropertyDescriptor(function(){}.bind(this), "arguments") < {get: function, set: function, enumerable: false, configurable: false} Also, it is possible that "arguments" should not be on the instance but actually on Function.prototype.
Attachments
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2015-02-16 15:29:16 PST
Note, this affects Web Inspector. We look at descriptors when expanding objects. When the "arguments" property getter is invoked outside of an invocation of the function it produces an error: js> (function(){}).bind(this).arguments < TypeError: Type error So when inspector tries to show the value of "arguments" in object expansion, we encounter the errors. It is a bit unfortunate and we may want to workaround this. js> dir(function(){}.bind(this)) < function () { [native code] } arguments: [Exception: TypeError: Type error] caller: [Exception: TypeError: Type error] length: 0 name: "" __proto__: function () {
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug