summaryrefslogtreecommitdiff
path: root/src/node_stat_watcher.cc
Commit message (Collapse)AuthorAgeFilesLines
* base-object: add BaseObjectTrevor Norris2013-11-121-4/+5
| | | | | | | | BaseObject is a class that just handles the Persistent handle attached to the class instance. This also removed WeakObject. Reordering the inheritance chain helps prevent unneeded calls on instances that don't call MakeCallback.
* src: fix Context::Scope usageBen Noordhuis2013-11-121-2/+2
| | | | | 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.
* src: fix Environment::GetCurrent() usageBen Noordhuis2013-11-111-1/+1
| | | | | | 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().
* async-wrap: integrate with WeakObjectTrevor Norris2013-10-311-9/+4
| | | | | Making WeakObject inherit from AsyncWrap allows us to peak into almost all the MakeCallback calls in Node internals.
* src: shorten Object{Wrap,Unwrap}Trevor Norris2013-10-291-2/+2
| | | | | | 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.
* src: don't use WeakObject::UnwrapTrevor Norris2013-10-291-2/+4
| | | | Switch out to use UnwrapObject from util.h.
* cpplint: disallow if one-linersFedor Indutny2013-10-171-2/+4
|
* cpplint: disallow comma-first in C++Fedor Indutny2013-10-171-3/+3
|
* src: remove ObjectWrap dependency from coreBen Noordhuis2013-09-251-10/+11
| | | | | | | | Drop the ObjectWrap dependency in favor of an internal WeakObject class. Let's us stop worrying about API and ABI compatibility when making changes to the way node.js deals with weakly persistent handles internally.
* src: add multi-context supportBen Noordhuis2013-09-061-23/+26
| | | | | | | | | | | | | | | | | | | | | | | 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: lint c++ codeFedor Indutny2013-07-311-5/+3
|
* src, lib: update after internal api changeBen Noordhuis2013-07-201-3/+0
| | | | | | | | 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().
* lib, src: upgrade after v8 api changeBen Noordhuis2013-07-061-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: replace Holder() with This()Trevor Norris2013-04-191-3/+3
| | | | Switch to always use args.This() to retrieve object instance.
* fs: uv_[fl]stat now reports subsecond resolutionTimothy J Fontaine2013-03-231-2/+2
| | | | | | While libuv supports reporting subsecond stat resolution across platforms, to actually get that resolution your platform and filesystem must support it (not HFS, ext[23], fat), otherwise the nsecs are 0
* src: pass Isolate to all applicable apiTrevor Norris2013-03-201-8/+8
| | | | | | 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-3/+3
|
* src: pass node_isolate to Undefined()Ben Noordhuis2013-01-071-2/+2
|
* src: pass node_isolate to Integer::NewBen Noordhuis2013-01-071-1/+1
|
* fs: fix use after free in stat watcherBen Noordhuis2012-08-201-7/+27
| | | | | The uv_fs_poll_t handle was stopped but not closed, leaving libuv's internal handle queue in a corrupted state.
* fs: make fs.watchFile() interval default to 5007Ben Noordhuis2012-06-211-25/+5
|
* fs: make fs.watchFile() work on windowsBen Noordhuis2012-06-211-32/+36
|
* MakeCallback: Consistent symbol usageisaacs2012-04-171-2/+10
|
* stat_watcher: root JS objects in HandleScope with Local<>Ben Noordhuis2012-03-301-3/+3
|
* Avoiding unnecessary ToString() callsssuda2012-03-231-1/+1
| | | | | String::Utf8Value and String::AsciiValue constructors take Handle<Value> So no need to convert to Handle<String>
* core: use proper #include directivesBen Noordhuis2012-03-101-1/+1
|
* Remove StatWatcher's dep on C++ EventEmitterRyan Dahl2011-07-191-9/+2
|
* Update copyright headersRyan Dahl2011-03-141-1/+21
|
* Re-enable stat watchers on windowsBert Belder2010-12-201-4/+0
| | | | This reverts commit b8a99f94167a25f63ae096d9d5e2cc9cf70cecef.
* Stat watchers don't work on windows yetBert Belder2010-12-201-0/+4
|
* Safe constructor for ObjectWrapped classesBen Noordhuis2010-09-291-0/+4
| | | | | | | New() methods should be invoked as constructors, not regular functions. Corner cases like Script::New() may cause a SIGSEGV when the GC is run. More details: http://groups.google.com/group/nodejs/browse_thread/thread/a7e5db68d4cd6356
* Revert "Check for strings.h"Ryan Dahl2010-05-101-5/+1
| | | | This reverts commit 032f651824869c429cc24fbd9f7a23e84ed34b1f.
* Check for strings.hRyan Dahl2010-05-101-1/+5
|
* Fix StatWatcher typoRyan Dahl2010-03-151-2/+2
|
* Use uniform watcher namesRyan Dahl2010-03-151-0/+109