Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong function name for getter/ setter (ES6) #7164

Closed
hoatle opened this issue Jun 5, 2016 · 3 comments
Closed

wrong function name for getter/ setter (ES6) #7164

hoatle opened this issue Jun 5, 2016 · 3 comments
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.

Comments

@hoatle
Copy link

hoatle commented Jun 5, 2016

  • Version: v6.2.1
  • Platform: Linux ee7f9120bc0a 3.13.0-86-generic lib: reintroduce v8 module #131-Ubuntu SMP Thu May 12 23:33:13 UTC 2016 x86_64 GNU/Linux
  • Subsystem:

sample code:

let obj = {
    get foo() {},
    set bar(value) {},
};

let getter = Object.getOwnPropertyDescriptor(obj, 'foo').get;
console.log(getter.name); //expect `get foo` but actual `foo`

let setter = Object.getOwnPropertyDescriptor(obj, 'bar').set;
console.log(setter.name); //expect `set bar` but actual `bar`

I tested this on Chrome and follow http://exploringjs.com/es6/ch_callables.html#_constructs-that-provide-names-for-functions (12.6.1.4 section), so I believe that it's a bug from NodeJS.

@vkurchatkin vkurchatkin added the v8 engine Issues and PRs related to the V8 dependency. label Jun 5, 2016
@vsemozhetbyt
Copy link
Contributor

vsemozhetbyt commented Jun 5, 2016

It's under --harmony_function_name flag in V8 5.0 (with this flag the output is the same as in the last Chrome Canary).

See http://node.green/#function--name--property (accessor properties).

@targos
Copy link
Member

targos commented Jun 6, 2016

This issue will be fixed with #7016.

@bnoordhuis
Copy link
Member

I'll close, not a node.js issue.

@bnoordhuis bnoordhuis added the invalid Issues and PRs that are invalid. label Jun 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

5 participants