summaryrefslogtreecommitdiff
path: root/src/node_counters.cc
Commit message (Collapse)AuthorAgeFilesLines
* src: fix tracing infrastructure after v8 upgradeBen Noordhuis2014-03-161-5/+11
| | | | | | | | Fix up the dtrace/etw/systemtap infrastructure after the V8 upgrade in commit 1c7bf24. The win32 changes are untested but can hardly make things worse because node doesn't build on windows right now. Fixes #7313 with some luck.
* src: remove `node_isolate` from sourceFedor Indutny2014-02-221-3/+5
| | | | fix #6899
* src: use v8::String::NewFrom*() functionsBen Noordhuis2013-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | * 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: lint c++ codeFedor Indutny2013-07-311-2/+3
|
* lib, src: upgrade after v8 api changeBen Noordhuis2013-07-061-33/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* src: pass Isolate to all applicable apiTrevor Norris2013-03-201-7/+7
| | | | | | Update the api to pass node_isolate to all supported methods. Much thanks to Ben Noordhuis and his work in 51f6e6a.
* bindings: update apiTrevor Norris2013-03-201-1/+1
| | | | | | | | | | | | | | | | | | | | | All compile time warnings about using deprecated APIs have been suppressed by updating node's API. Though there are still many function calls that can accept Isolate, and still need to be updated. node_isolate had to be added as an extern variable in node.h and node_object_wrap.h Also a couple small fixes for Error handling. Before v8 3.16.6 the error stack message was lazily written when it was needed, which allowed you to change the message after instantiation. Then the stack would be written with the new message the first time it was accessed. Though that has changed. Now it creates the stack message on instantiation. So setting a different message afterwards won't be displayed. This is not a complete fix for the problem. Getting error without any message isn't very useful.
* src, test: downgrade to v8 3.14 apiBen Noordhuis2013-02-251-6/+6
|
* src: pass node_isolate to Undefined()Ben Noordhuis2013-01-071-6/+6
|
* windows: add tracing with performance countersScott Blomquist2012-11-211-0/+149
Patch by Henry Rawas and Scott Blomquist.