Age | Commit message (Collapse) | Author |
|
Conflicts:
AUTHORS
ChangeLog
deps/v8/src/api.cc
deps/v8/src/unicode-inl.h
deps/v8/src/unicode.h
lib/_stream_readable.js
lib/http.js
src/cares_wrap.cc
src/node.cc
src/node_crypto.cc
src/node_dtrace.cc
src/node_file.cc
src/node_stat_watcher.cc
src/node_version.h
src/process_wrap.cc
src/string_bytes.cc
src/string_bytes.h
src/udp_wrap.cc
src/util.h
test/simple/test-buffer.js
test/simple/test-stream2-compatibility.js
|
|
v8::String::Utf8Value previously could allow invalid surrogates when
interpreting values.
|
|
This prevents segfaults when a native method is reassigned to a
different object (which corrupts args.This()). When unwrapping,
clients should use args.Holder() instead of args.This().
Closes #6690.
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
fix #6899
|
|
These will be used to allow users to filter for which types of calls
they wish their callbacks to run.
Signed-off-by: Timothy J Fontaine <tjfontaine@gmail.com>
|
|
Built-in modules should be automatically registered, replacing the
static module list. Add-on modules should also be automatically
registered via DSO constructors. This improves flexibility in adding
built-in modules and is also a prerequisite to pure-C addon modules.
|
|
env->context() may or may not create a new Local. It currently does
not but don't depend on that behavior, create a HandleScope first.
|
|
Create a HandleScope before calling the Environment::GetCurrent() that
takes a v8::Isolate* as an argument because it creates a handle with
the call to v8::Isolate::CurrentContext().
|
|
AsyncListener is a JS API that works in tandem with the AsyncWrap class
to allow the user to be alerted to key events in the life cycle of an
asynchronous event. The AsyncWrap class has its own MakeCallback
implementation that core will be migrated to use, and uses state sharing
techniques to allow quicker communication between JS and C++ whether the
async event callbacks need to be called.
|
|
Going back to the original names of Wrap/Unwrap now that most all the
class members that duplicate the name and functionality have been
removed.
|
|
Instead use the template functions in util.h.
|
|
Remove the NODE_{WRAP,UNWRAP} macros and instead use template functions.
|
|
This commit makes it possible to use multiple V8 execution contexts
within a single event loop. Put another way, handle and request wrap
objects now "remember" the context they belong to and switch back to
that context when the time comes to call into JS land.
This could have been done in a quick and hacky way by calling
v8::Object::GetCreationContext() on the wrap object right before
making a callback but that leaves a fairly wide margin for bugs.
Instead, we make the context explicit through a new Environment class
that encapsulates everything (or almost everything) that belongs to
the context. Variables that used to be a static or a global are now
members of the aforementioned class. An additional benefit is that
this approach should make it relatively straightforward to add full
isolate support in due course.
There is no JavaScript API yet but that will be added in the near
future.
This work was graciously sponsored by GitHub, Inc.
|
|
* upgrade deps/uv/ to v0.11.12.
* update files in src/ after a libuv API change.
|
|
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 ca9eb71 a negative result value indicates that
uv_spawn() has failed, so this is no longer acceptable.
|
|
The `exit_code` argument for the `ProcessWrap::OnExit` callback changed
from int to int64_t.
|
|
WRAP is too generic a macro name and causes the build to fail from
conflicts. They have been prepended with NODE_.
|
|
While almost all cases were handled by simple WRAP/UNWRAP macros, this
extends those to cover all known occurrences.
|
|
* Change calls to String::New() and String::NewSymbol() to their
respective one-byte, two-byte and UTF-8 counterparts.
* Add a FIXED_ONE_BYTE_STRING macro that takes a string literal and
turns it into a v8::Local<v8::String>.
* Add helper functions that make v8::String::NewFromOneByte() easier to
work with. Said function expects a `const uint8_t*` but almost every
call site deals with `const char*` or `const unsigned char*`. Helps
us avoid doing reinterpret_casts all over the place.
* Code that handles file system paths keeps using UTF-8 for backwards
compatibility reasons. At least now the use of UTF-8 is explicit.
* Remove v8::String::NewSymbol() entirely. Almost all call sites were
effectively minor de-optimizations. If you create a string only once,
there is no point in making it a symbol. If you are create the same
string repeatedly, it should probably be cached in a persistent
handle.
|
|
It's never been used and we probably never will. Remove it.
|
|
Don't create a superfluous Number object, just use the version of
v8::Object::Get() that takes an unsigned int. Convert the index to
unsigned int while we're here.
|
|
|
|
Libuv now returns errors directly. Make everything in src/ and lib/
follow suit.
The changes to lib/ are not strictly necessary but they remove the need
for the abominations that are process._errno and node::SetErrno().
|
|
This is a big commit that touches just about every file in the src/
directory. The V8 API has changed in significant ways. The most
important changes are:
* Binding functions take a const v8::FunctionCallbackInfo<T>& argument
rather than a const v8::Arguments& argument.
* Binding functions return void rather than v8::Handle<v8::Value>. The
return value is returned with the args.GetReturnValue().Set() family
of functions.
* v8::Persistent<T> no longer derives from v8::Handle<T> and no longer
allows you to directly dereference the object that the persistent
handle points to. This means that the common pattern of caching
oft-used JS values in a persistent handle no longer quite works,
you first need to reconstruct a v8::Local<T> from the persistent
handle with the Local<T>::New(isolate, persistent) factory method.
A handful of (internal) convenience classes and functions have been
added to make dealing with the new API a little easier.
The most visible one is node::Cached<T>, which wraps a v8::Persistent<T>
with some template sugar. It can hold arbitrary types but so far it's
exclusively used for v8::Strings (which was by far the most commonly
cached handle type.)
|
|
Remove the unused ones and alphabetically sort the ones that remain.
|
|
Originally contributed by @tjfontaine, but modified to be faster and
more generic.
|
|
|
|
|
|
Update the api to pass node_isolate to all supported methods.
Much thanks to Ben Noordhuis and his work in 51f6e6a.
|
|
|
|
|
|
libuv calls the exit cb with exit code == -1 when it fails to spawn the new
process. Anticipate that and emit the error on the ChildProcess object.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
It was a temporary thing for the 0.6 branch only.
|
|
Conflicts:
deps/uv/include/uv-private/uv-unix.h
deps/uv/include/uv-private/uv-win.h
deps/uv/src/uv-common.c
deps/uv/src/win/fs.c
src/process_wrap.cc
|
|
file and cwd can be directly used from Utf8Value.
Conflicts:
src/process_wrap.cc
|
|
|
|
|
|
|
|
String::Utf8Value and String::AsciiValue constructors take Handle<Value>
So no need to convert to Handle<String>
|
|
file and cwd can be directly used from Utf8Value.
|
|
|
|
It was decided that the performance benefits that isolates offer (faster spin-up
times for worker processes, faster inter-worker communication, possibly a lower
memory footprint) are not actual bottlenecks for most people and do not outweigh
the potential stability issues and intrusive changes to the code base that
first-class support for isolates requires.
Hence, this commit backs out all isolates-related changes.
Good bye, isolates. We hardly knew ye.
|
|
Conflicts:
src/handle_wrap.cc
src/node_zlib.cc
src/process_wrap.cc
|