summaryrefslogtreecommitdiff
path: root/src/uv.cc
Commit message (Collapse)AuthorAgeFilesLines
* src: attach env directly to api functionsBen Noordhuis2014-10-131-2/+2
| | | | | | | | | | | | | | | | | 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>
* src: remove unnecessary HandleScopesBen Noordhuis2014-10-121-2/+0
| | | | | | | | 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>
* src: update to v8 3.24 APIsFedor Indutny2014-03-131-2/+2
|
* src: remove `node_isolate` from sourceFedor Indutny2014-02-221-6/+10
| | | | fix #6899
* node: register modules from DSO constructorsKeith M Wesolowski2014-01-271-1/+1
| | | | | | | 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.
* cpplint: disallow if one-linersFedor Indutny2013-10-171-1/+2
|
* src: add multi-context supportBen Noordhuis2013-09-061-3/+5
| | | | | | | | | | | | | | | | | | | | | | | 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.
* src: use v8::String::NewFrom*() functionsBen Noordhuis2013-08-091-4/+5
| | | | | | | | | | | | | | | | | | | | | | * 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.
* src: more lint after cpplint tighteningBen Noordhuis2013-07-311-1/+1
| | | | | Commit 847c6d9 adds a 'project headers before system headers' check to cpplint. Update the files in src/ to make the linter pass again.
* src: add libuv bindings moduleBen Noordhuis2013-07-201-0/+61
Exports: * all UV_E* error codes * a uv_err_name() binding