0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
Commit Graph

10 Commits

Author SHA1 Message Date
Ben Noordhuis
3c85f4e237 test: don't use internal headers in add-on tests
There is no real need and it causes endless grief on Windows with some
of the upcoming changes.

PR-URL: https://github.com/nodejs/node/pull/6734
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-06-29 13:49:35 +02:00
Ben Noordhuis
eff96d32dc 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-05-25 09:54:24 +02:00
Rich Trott
a56da51a38 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-11 23:18:16 -07:00
Ben Noordhuis
f644368e7c 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-10 17:10:08 +02:00
Rich Trott
6c49714df0 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-04-28 19:22:16 -07: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