non-writable configurable means you can change the value. function f() {} Object.defineProperty(f, 'name', {value: 'fff'});
On Thu, Feb 12, 2015 at 11:21 AM, Yury Semikhatsky <yu...@chromium.org> wrote: > If its read-only it doesn't seem to be addressing use cases described in the > bug and we still need displayName. > > On Thu, Feb 12, 2015 at 7:09 PM, Erik Arvidsson <a...@google.com> wrote: >> >> On Feb 12, 2015 11:00 AM, "Yury Semikhatsky" <yu...@chromium.org> wrote: >>> >>> Is Function.name going to writable in ES6? MDN says that the property is >>> read-only. >> >> >> http://people.mozilla.org/~jorendorff/es6-draft.html#sec-name >> >> Correction, it is configurable, non writable, which in practice means you >> can change the value. >> >> >>> >>> >>> >>> >>> On Thu, Feb 12, 2015 at 6:53 PM, Erik Arvidsson <a...@google.com> wrote: >>>> >>>> With ES6 and writable function name property the motivation for this is >>>> as low as ever. >>>> >>>> Maybe we should just work on implementing ES6 logic for function name >>>> instead? >>>> >>>> On Feb 12, 2015 9:59 AM, <kozyatins...@chromium.org> wrote: >>>>> >>>>> Our stack getter is lazy, isn't it? I suppose if user want to receive >>>>> stack >>>>> trace and set for some functions displayName then we can spend one more >>>>> moment >>>>> for return more useful stack trace. >>>>> >>>>> >>>>> https://codereview.chromium.org/919653002/diff/20001/src/messages.js >>>>> File src/messages.js (right): >>>>> >>>>> >>>>> https://codereview.chromium.org/919653002/diff/20001/src/messages.js#newcode829 >>>>> src/messages.js:829: if (name && IS_STRING(name)) { >>>>> On 2015/02/12 14:15:29, Yang wrote: >>>>>> >>>>>> I think a single IS_STRING(name) would suffice, as undefined is not a >>>>> >>>>> String. >>>>> >>>>>> Unless you want to filter out the empty string, since it evaluates to >>>>> >>>>> false. In >>>>>> >>>>>> which case it would be better to explicitly do a string length >>>>> >>>>> comparison. >>>>> >>>>> Done. >>>>> >>>>> https://codereview.chromium.org/919653002/ >>>>> >>>>> -- >>>>> -- >>>>> v8-dev mailing list >>>>> v8-dev@googlegroups.com >>>>> http://groups.google.com/group/v8-dev >>>>> ---You received this message because you are subscribed to the Google >>>>> Groups "v8-dev" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to v8-dev+unsubscr...@googlegroups.com. >>>>> For more options, visit https://groups.google.com/d/optout. >>> >>> > -- erik -- -- v8-dev mailing list v8-dev@googlegroups.com http://groups.google.com/group/v8-dev --- You received this message because you are subscribed to the Google Groups "v8-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.