Ben Noordhuis
64445674f0
src: add include guards to internal headers
...
For consistency with the newly added src/base64.h header, check that
NODE_WANT_INTERNALS is defined and set in internal headers.
PR-URL: https://github.com/nodejs/node/pull/6948
Refs: https://github.com/nodejs/node/pull/6910
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2016-06-02 22:40:43 +10:00
Ben Noordhuis
f264749c5c
test: build addons with V8_DEPRECATION_WARNINGS=1
...
PR-URL: https://github.com/nodejs/node/pull/6652
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2016-05-17 08:33:38 -05:00
Rich Trott
955c90d725
benchmark,test,lib: remove extra spaces
...
In preparation for stricter linting, remove extra spaces.
PR-URL: https://github.com/nodejs/node/pull/6645
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-05-17 08:01:12 -05:00
Rich Trott
089362f8b8
test,tools: limit lint tolerance of gc global
...
Lint rules permitted the `gc` global in any test file. This change
limits it to just the files that need it.
PR-URL: https://github.com/nodejs/node/pull/6324
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2016-05-03 20:20:33 -04:00
Anna Henningsen
be97db92af
test: add buffer alignment regression tests
...
Buffers instances can have arbitrary alignment. `node-ffi` depends on
this. Add some regression tests to ensure we don't break this in the
future.
PR-URL: https://github.com/nodejs/node/pull/5752
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com >
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl >
2016-03-19 07:08:08 -07:00
Rich Trott
a030c5cf49
test: remove unused assert module imports
...
Many test modules load assert but do not use it. This change removes
those instances.
It also removes a handful of other unused variables when they were
nearby.
PR-URL: https://github.com/nodejs/node/pull/4438
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2015-12-30 11:45:34 -08:00
Fedor Indutny
931118c9d7
buffer: fix assertion error in WeakCallback
...
`CallbackInfo` is now bound to `ArrayBuffer` instance, not `Uint8Array`,
therefore `SPREAD_ARG` will abort with:
Assertion failed: ((object)->IsUint8Array())
Make changes necessary to migrate it to `ArrayBuffer`.
See: https://github.com/nodejs/node/pull/3080#issuecomment-147502167
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/3329
2015-10-12 20:47:10 -07:00
Rich Trott
6f63a4af0e
test: linting for buffer-free-callback test
...
Test added in d1f24044 does not pass linting rule added in 3de353b5 .
Fixed in this commit. `common` module required in all tests except
those that intentionally leak variables.
PR-URL: https://github.com/nodejs/node/pull/3230
Fixes: https://github.com/nodejs/node/issues/3229
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com >
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com >
2015-10-06 21:35:00 -07:00
Fedor Indutny
d1f24044b9
buffer: FreeCallback should be tied to ArrayBuffer
...
FreeCallback should be invoked on the storage disposal (`ArrayBuffer`),
not when the view (`Uint8Array` or `Buffer`) is disposed. This causes
bug and crashes in addons which create buffers and store only slices of
them.
PR-URL: https://github.com/nodejs/node/pull/3198
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2015-10-06 18:57:46 -04:00