| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Re-add the wrapper class id to AsyncWrap instances so they can be
tracked directly in a heapdump.
Previously the class id was given without setting the heap dump wrapper
class info provider. Causing a segfault when a heapdump was taken. This
has been added, and the label_ set to the given provider name so each
instance can be identified.
The id will not be set of the passed object has no internal field count.
As the class pointer cannot be retrieved from the object.
In order to properly report the allocated size of each class, the new
pure virtual method self_size() has been introduces.
PR-URL: https://github.com/nodejs/io.js/pull/1896
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
| |
Fixes a SIGSEGV by making sure `txt_chunk` is not empty before setting
it on `txt_records`
PR-URL: https://github.com/iojs/io.js/pull/960
Reviewed-By: Rod Vagg <rod@vagg.org>
|
|
|
|
|
|
|
|
|
| |
This commit also breaks up req_wrap.h into req-wrap.h and req-wrap-inl.h
to work around a circular dependency issue in env.h.
PR-URL: https://github.com/iojs/io.js/pull/667
Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
|
| |
OpenBSD doesn't define AI_V4MAPPED by default. Defining it to 0
as done with other ports.
PR-URL: https://github.com/iojs/io.js/pull/427
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
| |
The copyright and license notice is already in the LICENSE file. There
is no justifiable reason to also require that it be included in every
file, since the individual files are not individually distributed except
as part of the entire package.
|
|
|
|
|
|
|
|
| |
Initial attempt to remove all uses of Isolate::GetCurrent(). Still
exists a few locations, but this works out a heavy usage.
PR-URL: https://github.com/iojs/io.js/pull/244
Reviewed-by: Ben Noordhuis <info@bnoordhuis.nl>
|
|
|
|
|
|
|
|
|
|
|
| |
The template class information is received via the type of the first
argument. So there is no need to use Wrap<T>(handle).
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of simply creating a new v8::Object to contain the connection
information, instantiate a new instance of a FunctionTemplate. This will
allow future improvements for debugging and performance probes.
Additionally, the "provider" argument in the ReqWrap constructor is no
longer optional.
PR-URL: https://github.com/joyent/node/pull/8110
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Fedor Indutny <fedor@indutny.com>
Reviewed-by: Alexis Campailla <alexis@janeasystems.com>
Reviewed-by: Julien Gilli <julien.gilli@joyent.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
Makefile
deps/v8/src/base/platform/platform.h
PR-URL: https://github.com/node-forward/node/pull/65
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
| |
| |
| |
| |
| |
| | |
Fixes: https://github.com/joyent/node/issues/5471
PR-URL: https://github.com/joyent/node/pull/8732
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
|
| |
| |
| |
| |
| | |
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
|
| |
| |
| |
| |
| |
| | |
Add `override` keywords where appropriate. Makes maintenance easier
because the compiler will shout at you when a base class changes in
an incompatible way.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that we are building with C++11 features enabled, replace use
of NULL with nullptr.
The benefit of using nullptr is that it can never be confused for
an integral type because it does not support implicit conversions
to integral types except boolean - unlike NULL, which is defined
as a literal `0`.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Attach the per-context execution environment directly to API functions.
Rationale:
* Gets node one step closer to multi-isolate readiness.
* Avoids multi-context confusion, e.g. when the caller and callee live
in different contexts.
* Avoids expensive calls to pthread_getspecific() on platforms where
V8 does not know how to use the thread-local storage directly.
(Linux, the BSDs.)
PR-URL: https://github.com/node-forward/node/pull/18
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove a few Environment::GetCurrent() calls that g++ failed to detect
were not used for anything. The return value was assigned to a local
variable but not used meaningfully.
PR-URL: https://github.com/node-forward/node/pull/18
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Mechanically replace assert() statements with UNREACHABLE(), CHECK(),
or CHECK_{EQ,NE,LT,GT,LE,GE}() statements.
The exceptions are src/node.h and src/node_object_wrap.h because they
are public headers.
PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
API callback functions don't need to create a v8::HandleScope instance
because V8 already creates one in the JS->C++ adapter frame.
PR-URL: https://github.com/node-forward/node/pull/16
Reviewed-By: Fedor Indutny <fedor@indutny.com>
|
|/
|
|
|
| |
Reviewed-By: Trevor Norris <trevnorris@gmail.com>
PR-URL: https://github.com/joyent/node/pull/8476
|
|
|
|
|
|
|
|
|
|
|
|
| |
The method GetAddrInfo() is used by more than just dns.lookup(), and in
those cases a third argument isn't passed. This caused the following
check to abort:
assert(args[3]->IsInt32());
Fixes: 4306786 "net: don't prefer IPv4 addresses during resolution"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the address resolution family defaults to IPv4. Instead remove
the preference and instead resolve to a family suitable for the host.
Expose the getaddrinfo flags and allow them to be passed.
Add documentation about new flags.
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
|
|
|
|
|
|
|
| |
Uses getnameinfo to resolve an address an port into a hostname and
service.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
Replace the CONTAINER_OF macro with a template function that is as
type-safe as a reinterpret_cast<> of an arbitrary pointer can be made.
Signed-off-by: Fedor Indutny <fedor@indutny.com>
|
| |
| |
| |
| |
| |
| |
| | |
Provide more information in `ares_txt_reply` to coalesce chunks from the
same record into one string.
fix #7367
|
| |
| |
| |
| |
| | |
async, timer, prepare, idle and check handles no longer get a status
parameter since they can never fail.
|
| | |
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
You can now query for SOA records by either passing 'SOA' to `resolve`
or by using the new `resolveSoa`
|
| | |
|
| |
| |
| |
| |
| | |
Enter the context explicitly, don't rely on the fact that there is a
Context::Scope a few stack frames below because it may be gone someday
|
| |
| |
| |
| |
| | |
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().
|
| |
| |
| |
| |
| |
| |
| |
| | |
CONTAINER_OF was introduced a while ago but was not used consistently
everywhere yet. This commit fixes that.
Why CONTAINER_OF instead of container_of? The former makes it crystal
clear that it's a macro, not a function.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The test case from the previous commit exposed a regression in the way
that c-ares errors are reported to JS land. Said regression was
introduced in commit 756b622 ("src: add multi-context support").
Fixes the following test failure:
$ out/Release/node test/simple/test-dns-regress-6244
util.js:675
var errname = uv.errname(err);
^
Error: err >= 0
at Object.exports._errnoException (util.js:675:20)
at errnoException (dns.js:43:15)
at Object.onresolve [as oncomplete] (dns.js:145:19)
lib/dns.js erroneously assumed that the error code was a libuv error
code when it's really a c-ares status code. Libuv handles getaddrinfo()
style lookups (which is by far the most common type of lookup), that's
why this bug wasn't discovered earlier.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Don't create an Integer when setting a numeric index on an object or an
array, use the version of v8::Object::Set() that takes an uint32_t.
Change the types of the variables from int to uint32_t and clean up
some code consistency issues while we're here.
|
| |
| |
| |
| | |
Hasn't been used in ages. Also remove its (already disabled) test.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Don't set the oncomplete property in src/cares_wrap.cc, we can do it
just as easily in lib/dns.js.
Switch two closures to the 'function with _this_ object' model. Makes
it impossible for an overzealous closure to capture too much context
and accidentally hold on to too much memory.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
| |
| |
| |
| |
| | |
Code cleanup, replace a few uses of reinterpret_cast<T*>(void_ptr) with
static_cast<T*>(void_ptr).
|
| |
| |
| |
| |
| | |
There is no need for it and it's a tiny bit slower than the version of
PersistentToLocal() that takes a v8::Isolate* as its first argument.
|
| |
| |
| |
| |
| | |
Commit 847c6d9 adds a 'project headers before system headers' check
to cpplint. Update the files in src/ to make the linter pass again.
|
| | |
|