Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

test-env-newprotomethod-remove-unnecessary-prototypes.js is failing #536

Open
mike-kaufman opened this issue May 9, 2018 · 2 comments
Open

Comments

@mike-kaufman
Copy link
Contributor

repro:

  1. open file test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js
  2. Remove if (!common.isChakraEngine) line
  3. run test via command out/Release/node /Users/mikekaufman/thub/mike-kaufman/node-chakracore/test/parallel/test-env-newprotomethod-remove-unnecessary-prototypes.js

expected: test passes
actual: test fails because prototype method is present

@kfarnung
Copy link
Contributor

It looks like V8 has a way to create a function which cannot be used as a constructor and doesn't contain a prototype property. We don't currently have a way to pass that flag to the engine using JSRT so we end up with a function that always has a prototype. Trying to delete the prototype is blocked since the property is not configurable.

@addaleax
Copy link
Member

I think the only intention here was creating fewer unnecessary objects, so I think it would be completely fine if ChakraCore ignores this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants