- Aug 29, 2013
-
-
Ben Noordhuis authored
Before this commit it was declared static (in a header file!), meaning it got duplicated in every file that includes it. A few duplicated pointers is not the end of the world but it introduces a lot of potential for confusion because root_cert_store in file A is not the root_cert_store in file B. Moral of the story: don't declare static variables in header files.
-
Ben Noordhuis authored
-
Ben Noordhuis authored
Doesn't matter now but it will if/when we have support for multiple threads.
-
Domenic Denicola authored
- The caveats no longer apply. - Document options arguments, including `displayErrors` and the different things it means in each place. - Re-did examples to be more on point, e.g. `runInContext` example runs multiple scripts in the same context. - Documented how `vm.createContext`s meaning has substantially changed, and is now more of a "contextifier" than a "creator." - Reordered vm functions to be readable in order; the concept of contextifying needs to come before `runInContext` and `runInNewContext`. - Documented new `vm.isContext`. - Documented the `vm.Script` constructor, instead of `createScript`, since factory methods are silly and we wanted to document the class's methods anyway. - Documented `script.runInContext`. - Change stability to stable, if I may be so bold.
-
Domenic Denicola authored
Passing a filename is still supported in place of certain options arguments, for backward-compatibility, but timeout and display-errors are not translated since those were undocumented. Also managed to eliminate an extra stack trace line by not calling through the `createScript` export. Added a few message tests to show how `displayErrors` works.
-
Bert Belder authored
-
Timothy J Fontaine authored
In `Timer.now` always update the loop time by calling uv_update_time. Previously we were trying to cache the loop time to prevent extra syscalls. While a noble goal, it can cause timers to fire early in certain circumstances. Especially seen in cpu bound work loads or work loads with synchronous file operations.
-
isaacs authored
Conflicts: AUTHORS ChangeLog deps/uv/ChangeLog deps/uv/include/uv-darwin.h deps/uv/src/unix/darwin.c deps/uv/src/unix/fsevents.c deps/uv/src/version.c lib/_stream_writable.js src/node_version.h
-
- Aug 28, 2013
-
-
Ben Noordhuis authored
Make the crypto.randomBytes() and crypto.pbkdf2() callback functions run inside the current domain (if any.) Fixes #3965.
-
Domenic Denicola authored
Previously, calling `vm.createContext(o)` repeatedly on the same `o` would cause new C++ `ContextifyContext`s to be created and stored on `o`, while the previous resident went off into leaked-memory limbo. Now, repeatedly trying to contextify a sandbox will do nothing after the first time. To detect this, an independently-useful `vm.isContext(sandbox)` export was added.
-
Domenic Denicola authored
This is always something you should do when using `SetHiddenValue`, apparently. Fixes #6115. Thanks @tjfontaine for the tips.
-
Domenic Denicola authored
This was a remnant of the original Contextify code, wherein ContextifyContext was a user-exposed object. In vm, it is not, so all of the ObjectWrap and function-template stuff for the ContextifyContext constructor is now unnecessary.
-
isaacs authored
Closes #6087
-
isaacs authored
Closes #6087
-
isaacs authored
Closes #6090
-
Mathias Buus authored
-
isaacs authored
There's no need to create a new Buffer instance if we're just going to immediately call toString() at the end anyway. Better to create a string up front, and setEncoding() on the streams, and do a string concatenation instead.
-
Seth Fitzsimmons authored
Only return strings when encoding is not null.
-
Trevor Norris authored
-
isaacs authored
Since the encoding is no longer relevant once it is decoded to a Buffer, it is confusing and incorrect to pass the encoding as 'utf8' or whatever in those cases. Closes #6119
-
Forrest L Norvell authored
Follows @isaacs's recommendations in joyent/node#5018. Includes some updates to documentation but not examples. Conflicts: lib/domain.js
-
isaacs authored
Just do the best we can with whatever libuv gives us. Also, document the semantics of `ctime` and the compatibility with Windows.
-
Jay Beavers authored
-
- Aug 27, 2013
-
-
isaacs authored
-
Ben Noordhuis authored
De-globalize use_npn and use_sni, they're only used in GetFeatures().
-
Ben Noordhuis authored
Should make tracing with valgrind a little easier on the eye and possibly help expose libuv handle lifecycle issues.
-
Ben Noordhuis authored
Ad-hoc duplicate of V8's --stack-size option. Superfluous in other words. Remove it.
-
Ben Noordhuis authored
UV_HANDLE_FIELDS is a libuv implementation detail. The ares_task_t struct only uses the uv_loop_t* field so be explicit about that.
-
Ben Noordhuis authored
-
Trevor Norris authored
Length arguments passed to SlowBuffer were coerced to Int32, not Uint32, so passing a negative number would throw the following: node: ../src/smalloc.cc:244: void node::smalloc::Alloc(): Assertion `length <= kMaxLength' failed. Aborted (core dumped) That has been fixed by coercing to Uint32 and comparing the value against kMaxLength.
-
Trevor Norris authored
Due to a lot of the util.is* checks there was much unnecessary overhead for the most common use case of Buffer. Which is creating a new Buffer instance for data from incoming I/O. NativeBuffer is a simple way to bypass all the unneeded checks and simply hand back a Buffer instance while setting the length.
-
- Aug 26, 2013
-
-
Ben Noordhuis authored
src/node_os.cc doesn't export anything that's used elsewhere. Remove it.
-
Bert Belder authored
On windows process exit codes can be greater than INT32_MAX. This used to be not much of a problem - greater values would just come out negative. However since ca9eb718 a negative result value indicates that uv_spawn() has failed, so this is no longer acceptable.
-
- Aug 25, 2013
-
-
Bert Belder authored
-
- Aug 24, 2013
-
-
Trevor Norris authored
Instead of doing all the domain handling in core, allow the domain to set an error handler that'll take care of it all. This way the domain error handling can be abstracted enough for any user to use it.
-
Bert Belder authored
The `exit_code` argument for the `ProcessWrap::OnExit` callback changed from int to int64_t.
-
Bert Belder authored
-
Bert Belder authored
-
- Aug 23, 2013
-
-
Ben Noordhuis authored
-