0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test
Trevor Norris 05d424c029 buffer: only check if instance is Uint8Array
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>
2015-10-06 15:41:24 -06:00
..
abort src: honor --abort_on_uncaught_exception flag 2015-09-17 15:25:25 -05:00
addons module: use UNC paths when loading native addons 2015-10-05 22:09:51 +02:00
cctest deps: check in gtest, add util unit test 2015-04-01 22:35:56 +02:00
debugger debugger: improve ESRCH error message 2015-06-05 05:54:19 +02:00
disabled test: replace deprecated util.debug() calls 2015-09-28 11:15:06 -07:00
fixtures node: add -c|--check CLI arg to syntax check script 2015-10-03 21:58:38 +10:00
gc src: replace usage of v8::Handle with v8::Local 2015-09-06 21:38:05 +10:00
internet test: split up internet dns tests 2015-09-12 13:52:04 -07:00
message test: mark eval_messages as flaky 2015-09-06 21:37:59 +10:00
parallel buffer: only check if instance is Uint8Array 2015-10-06 15:41:24 -06:00
pummel test: change calls to deprecated util.print() 2015-09-28 13:21:15 -07:00
sequential module: remove unnecessary property and method 2015-10-06 18:56:20 +05:30
testpy test: fix default value for additional param 2015-09-15 19:59:38 +05:30
timers test: enable linting for tests 2015-05-19 21:21:27 +02:00
.eslintrc test: disallow unreachable code 2015-08-20 20:12:44 +02:00
common.js test: fix invalid variable name 2015-10-02 01:39:37 +05:30