buffer: make Buffer binding and prototype setup more straight-forward
buffer: move initialization of buffer prototype into node.js
Instead of exposing setBufferJS
in lib/internal/buffer.js
after deleting
it from the binding and then do the initialization in
lib/buffer.js
, which results in an implicit dependency on
the order in which these modules are loaded.
buffer: move Buffer prototype wiring into internal/buffer.js
Instead of exposing the Buffer prototype methods through an
object in internal/buffer.js
and then iterating over it
to put the methods on the prototype, create a function
in internal/buffer.js
to do this.
Also moves the creation of the FastBuffer
class into
internal/buffer.js
and expose it directly instead of
writing it onto that module later.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines