-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Reflect.getPrototypeOf(TypeError) should return the Error prototype #5065
Comments
Behavior looks correct to me. |
@gfablima , were you running this test using Node-ChakraCore? If so, I believe this may be caused by our monkey-patching of the error object in order to support custom V8 APIs. |
I don't know if I'm running node-chakracore. I got the binary from master branch, running "./build.sh --static" |
@fatcerberus what version of ChakraCore were you testing on? I can reproduce on a recent build:
Assigning to myself for now to investigate |
It looks like this is controlled by the flag -ES6PrototypeChain which is defined as false in https://github.com/Microsoft/ChakraCore/blob/master/lib/Common/ConfigFlagsList.h#L613. I'm going to have to ask around as to why this is false- if I run |
Ah, that explains it: My runtime initialization includes |
@fatcerberus that makes sense 😄 - I'll follow up on whether we can turn this on by default. @gfablima does @fatcerberus's pattern work for you? |
Hi @fatcerberus and @digitalinfinity. |
Change is ready but the compat risk is high for 1.10- moving to vNext so that we have additional cushion for compat testing |
We want to enable the `-Es6PrototypeChain` flag by default to support the spec better. Most of this PR is updating test baselines. Fixes #5065
Hi everyone,
when we try to get the prototype of an TypeError with Reflect.getPrototypeOf(TypeError) or Object.getPrototypeOf(TypeError) is expected that these functions should return the Error function.
OS: Ubuntu 16.04 x86
Chakra: 1.9
Step to reproduce:
Actual results:
expected: function Error() {[native code]}, got: function () {[native code]}
Expected results:
pass without failures
Same occurs with RangeError, EvalError, ReferenceError, SyntaxError and URIError.
V8, SpiderMonkey and JavascriptCore work as expected.
The text was updated successfully, but these errors were encountered: