node/src
Trevor Norris 57ed3daebf buffer: fix and cleanup fill()
Running fill() with an empty string would cause Node to hang
indefinitely. Now it will return without having operated on the buffer.

User facing function has been pulled into JS to perform all initial
value checks and coercions. The C++ method has been placed on the
"internal" object.

Coerced non-string values to numbers to match v0.10 support.

Simplified logic and changed a couple variable names.

Added tests for fill() and moved them all to the beginning of
buffer-test.js since many other tests depend on fill() working properly.

Fixes: https://github.com/joyent/node/issues/8469
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-09-29 17:36:03 -07:00
..
res win: manifest node.exe for Windows 8.1 2014-09-17 14:26:35 -07:00
async-wrap-inl.h node,async-wrap: verify domain enter/exit are set 2014-09-02 11:30:45 -07:00
async-wrap.h dns: introduce lookupService function 2014-06-27 04:02:19 +04:00
base-object-inl.h base-object: add BaseObject 2013-11-12 13:38:31 -08:00
base-object.h src: update and expand comments in base-object.h 2014-09-05 09:34:27 -07:00
cares_wrap.cc dns: fix GetAddrInfo assert 2014-08-04 18:19:45 -07:00
env-inl.h src: remove Environment::GetCurrentChecked() 2014-09-05 09:54:10 -07:00
env.h buffer: fix and cleanup fill() 2014-09-29 17:36:03 -07:00
fs_event_wrap.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
handle_wrap.cc node: add signature to SET_PROTOTYPE_METHOD 2014-04-02 01:48:34 -07:00
handle_wrap.h headers: fix spelling error 2014-02-08 00:19:50 +04:00
node.cc src: fix VC++ warning C4244 2014-09-29 13:47:17 -07:00
node.d dtrace: add missing translator 2012-02-03 14:07:32 +00:00
node.h node: set names for prototype methods 2014-08-11 17:10:43 -07:00
node.js node: support v8 microtask queue 2014-09-18 14:13:06 -07:00
node.stp systemtap: add tapset for node user probes 2013-05-22 20:19:31 -07:00
node_buffer.cc buffer: fix and cleanup fill() 2014-09-29 17:36:03 -07:00
node_buffer.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_constants.cc crypto: wrap ECDH constants in HAVE_OPENSSL 2014-09-01 19:30:13 +04:00
node_constants.h src: lint c++ code 2013-07-31 22:12:06 +04:00
node_contextify.cc lib, src: add vm.runInDebugContext() 2014-09-16 12:28:47 -07:00
node_counters.cc src: fix tracing infrastructure after v8 upgrade 2014-03-16 16:15:34 +04:00
node_counters.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_crypto.cc crypto: export externals to internal structs 2014-09-23 13:54:03 +04:00
node_crypto.h crypto: export externals to internal structs 2014-09-23 13:54:03 +04:00
node_crypto_bio.cc crypto: lower RSS usage for TLSCallbacks 2014-09-26 08:21:36 +04:00
node_crypto_bio.h crypto: lower RSS usage for TLSCallbacks 2014-09-26 08:21:36 +04:00
node_crypto_clienthello-inl.h tls: asynchronous SNICallback 2013-08-06 16:13:01 +04:00
node_crypto_clienthello.cc crypto: fix version check in hello parser 2014-05-16 12:48:58 +04:00
node_crypto_clienthello.h tls: support OCSP on client and server 2014-04-18 02:21:16 +04:00
node_crypto_groups.h src: lint c++ code 2013-07-31 22:12:06 +04:00
node_dtrace.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
node_dtrace.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_file.cc deps: update uv to v1.0.0-rc1 2014-09-23 08:18:41 -07:00
node_file.h src: add multi-context support 2013-09-06 05:51:42 +02:00
node_http_parser.cc lib, src: don't make http parser handles weak 2014-09-05 09:34:15 -07:00
node_http_parser.h src: lint c++ code 2013-07-31 22:12:06 +04:00
node_internals.h crypto: export externals to internal structs 2014-09-23 13:54:03 +04:00
node_javascript.cc src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_javascript.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_main.cc core: use proper #include directives 2012-03-10 00:14:14 +01:00
node_object_wrap.h src, test: fix up ObjectWrap, `make test-addons` 2014-03-14 00:41:04 +04:00
node_os.cc src: update to v8 3.24 APIs 2014-03-13 20:56:55 +04:00
node_provider.d src: fix tracing infrastructure after v8 upgrade 2014-03-16 16:15:34 +04:00
node_root_certs.h crypto: update root certificates 2014-02-04 01:42:52 +04:00
node_stat_watcher.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
node_stat_watcher.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_v8.cc src: replace CONTAINER_OF with type-safe function 2014-05-30 11:45:37 +01:00
node_version.h Now working on 0.11.15 2014-09-24 17:15:10 -07:00
node_watchdog.cc watchdog: terminate one specific isolate 2014-06-12 18:30:26 -07:00
node_watchdog.h watchdog: terminate one specific isolate 2014-06-12 18:30:26 -07:00
node_win32_etw_provider-inl.h src: fix tracing infrastructure after v8 upgrade 2014-03-16 16:15:34 +04:00
node_win32_etw_provider.cc src: update uv callbacks after API changes 2014-04-07 16:37:20 +04:00
node_win32_etw_provider.h src: fix tracing infrastructure after v8 upgrade 2014-03-16 16:15:34 +04:00
node_win32_perfctr_provider.cc build: un-break the windows build 2013-08-01 11:39:25 +02:00
node_win32_perfctr_provider.h src: lint c++ code 2013-07-31 22:12:06 +04:00
node_wrap.h src: remove `node_isolate` from source 2014-02-22 03:20:56 +04:00
node_zlib.cc src: replace CONTAINER_OF with type-safe function 2014-05-30 11:45:37 +01:00
notrace_macros.py src: rename macros.py to notrace_macros.py 2013-07-24 21:49:18 +02:00
perfctr_macros.py windows: add tracing with performance counters 2012-11-21 01:21:53 +01:00
pipe_wrap.cc stream_wrap: Add support to write binary strings 2014-09-03 03:36:17 -07:00
pipe_wrap.h src: don't use class specific Unwrap methods 2013-10-29 15:09:44 -07:00
process_wrap.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
queue.h src: make queue.h c++ compatible 2013-11-20 00:26:30 +01:00
req_wrap.h src: update to v8 3.24 APIs 2014-03-13 20:56:55 +04:00
signal_wrap.cc src: replace CONTAINER_OF with type-safe function 2014-05-30 11:45:37 +01:00
smalloc.cc smalloc: rework double free bug fix 2014-05-23 15:21:35 -07:00
smalloc.h smalloc: remove `env.h` include 2014-03-02 12:05:13 +04:00
spawn_sync.cc child_process: copy spawnSync() cwd option to proper buffer 2014-07-12 12:46:16 +03:00
spawn_sync.h src: update uv callbacks after API changes 2014-04-07 16:37:20 +04:00
stream_wrap.cc tls_wrap: fix use after free 2014-09-03 17:36:54 +04:00
stream_wrap.h tls_wrap: fix use after free 2014-09-03 17:36:54 +04:00
string_bytes.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
string_bytes.h Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
tcp_wrap.cc stream_wrap: Add support to write binary strings 2014-09-03 03:36:17 -07:00
tcp_wrap.h src: don't use class specific Unwrap methods 2013-10-29 15:09:44 -07:00
timer_wrap.cc timer_wrap: remove HandleScopes, check return size 2014-09-29 10:13:35 -07:00
tls_wrap.cc crypto: lower RSS usage for TLSCallbacks 2014-09-26 08:21:36 +04:00
tls_wrap.h crypto: lower RSS usage for TLSCallbacks 2014-09-26 08:21:36 +04:00
tree.h dns: don't rely on libuv for c-ares integration 2012-08-07 01:57:50 +02:00
tty_wrap.cc stream_wrap: Add support to write binary strings 2014-09-03 03:36:17 -07:00
tty_wrap.h src: don't use class specific Unwrap methods 2013-10-29 15:09:44 -07:00
udp_wrap.cc udp: make it possible to receive empty udp packets 2014-07-02 20:59:27 -07:00
udp_wrap.h src: don't use class specific Unwrap methods 2013-10-29 15:09:44 -07:00
util-inl.h src: add ClearWrap() to util.h 2014-09-05 09:33:58 -07:00
util.cc Merge remote-tracking branch 'upstream/v0.10' 2014-06-10 19:36:04 -04:00
util.h src: add ClearWrap() to util.h 2014-09-05 09:33:58 -07:00
uv.cc src: update to v8 3.24 APIs 2014-03-13 20:56:55 +04:00
v8abbr.h dtrace: backport two byte string fix 2013-10-09 08:49:39 -07:00
v8ustack.d dtrace: backport two byte string fix 2013-10-09 08:49:39 -07:00