In Node 4, the last statement evaluates to true, but in Node 6 it evaluates to false. Is this a bug?
F = () => {};
F.prototype = {};
Object.create(F.prototype) instanceof F;
Another user verified the behavior on their Windows system: http://stackoverflow.com/questions/38253656/instanceof-evaluates-to-true-in-node-4-but-not-node-6
/cc @nodejs/v8
I should note that it returns true in master.
Looks like a bug to me. v7.0.0-pre (V8 5.1) returns true, which is what I would expect.
All Node.js version 6.x releases that I tried returned the surprising false including 6.0.0.
Version 5.12.0 returned true.
So this would seem to be either a bug in the V8 that shipped with Node.js v6.x or (less likely, I imagine, but still possible) a bug in a patch that we are only floating in v6.x. (I'm not even sure there are any that are in 6.x but not in 5.x or current master.)
In d8 version 5.0.71.54 it returns false. So not related to floating patches.
This is the commit that fixed it: https://codereview.chromium.org/1810953002/
The patch applies clean on v6.x and fixes this issue. Do we want to float the patch on v6.x or just wait because it's fixed in V8 5.1 anyways?
/cc @nodejs/lts Not strictly an LTS question/issue, but I suspect they'll have an opinion on @fhinkel's question.
Another patch was recently back ported to 5.1 by @bnoordhuis
There is going to be a discussion about maintaining lts release streams directly from V8 to avoid floating patches. Aiming for 6 am estwif anyone wants to join.
I'm all for back-porting patches that apply cleanly or with minimal wedging.
@fhinkel I see you've done the work already. If you file a pull request and cc me, I'll review it.
Fixed in https://github.com/nodejs/node/pull/7638.
Can we close this?
Yup, works as expected in 6.3.1. Thanks for taking care of this!
Most helpful comment
Yup, works as expected in 6.3.1. Thanks for taking care of this!