mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
05d424c029
Native Buffer method calls do not require anything from the prototype. So it is unnecessary to check if the Object's prototype is equal to Buffer.prototype. This fixes an issue that prevents Buffer from being inherited the ES5 way. Now the following will work: function A(n) { const b = new Buffer(n); Object.setPrototypeOf(b, A.prototype); return b; } Object.setPrototypeOf(A.prototype, Buffer.prototype); Object.setPrototypeOf(A, Buffer); console.log(new A(4)); Fix: https://github.com/nodejs/node/issues/2882 PR-URL: https://github.com/nodejs/node/pull/3080 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> |
||
---|---|---|
.. | ||
abort | ||
addons | ||
cctest | ||
debugger | ||
disabled | ||
fixtures | ||
gc | ||
internet | ||
message | ||
parallel | ||
pummel | ||
sequential | ||
testpy | ||
timers | ||
.eslintrc | ||
common.js |