summaryrefslogtreecommitdiff
path: root/src/node_stat_watcher.cc
AgeCommit message (Collapse)Author
2013-11-11src: fix Environment::GetCurrent() usageBen Noordhuis
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().
2013-10-31async-wrap: integrate with WeakObjectTrevor Norris
Making WeakObject inherit from AsyncWrap allows us to peak into almost all the MakeCallback calls in Node internals.
2013-10-29src: shorten Object{Wrap,Unwrap}Trevor Norris
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.
2013-10-29src: don't use WeakObject::UnwrapTrevor Norris
Switch out to use UnwrapObject from util.h.
2013-10-17cpplint: disallow if one-linersFedor Indutny
2013-10-17cpplint: disallow comma-first in C++Fedor Indutny
2013-09-25src: remove ObjectWrap dependency from coreBen Noordhuis
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.
2013-09-06src: add multi-context supportBen Noordhuis
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.
2013-08-09src: use v8::String::NewFrom*() functionsBen Noordhuis
* 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.
2013-07-31src: lint c++ codeFedor Indutny
2013-07-20src, lib: update after internal api changeBen Noordhuis
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().
2013-07-06lib, src: upgrade after v8 api changeBen Noordhuis
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.)
2013-04-19src: replace Holder() with This()Trevor Norris
Switch to always use args.This() to retrieve object instance.
2013-03-23fs: uv_[fl]stat now reports subsecond resolutionTimothy J Fontaine
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
2013-03-20src: pass Isolate to all applicable apiTrevor Norris
Update the api to pass node_isolate to all supported methods. Much thanks to Ben Noordhuis and his work in 51f6e6a.
2013-03-20bindings: update apiTrevor Norris
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.
2013-02-25src, test: downgrade to v8 3.14 apiBen Noordhuis
2013-01-07src: pass node_isolate to Undefined()Ben Noordhuis
2013-01-07src: pass node_isolate to Integer::NewBen Noordhuis
2012-08-20fs: fix use after free in stat watcherBen Noordhuis
The uv_fs_poll_t handle was stopped but not closed, leaving libuv's internal handle queue in a corrupted state.
2012-06-21fs: make fs.watchFile() interval default to 5007Ben Noordhuis
2012-06-21fs: make fs.watchFile() work on windowsBen Noordhuis
2012-04-17MakeCallback: Consistent symbol usageisaacs
2012-03-30stat_watcher: root JS objects in HandleScope with Local<>Ben Noordhuis
2012-03-23Avoiding unnecessary ToString() callsssuda
String::Utf8Value and String::AsciiValue constructors take Handle<Value> So no need to convert to Handle<String>
2012-03-10core: use proper #include directivesBen Noordhuis
2011-07-19Remove StatWatcher's dep on C++ EventEmitterRyan Dahl
2011-03-14Update copyright headersRyan Dahl
2010-12-20Re-enable stat watchers on windowsBert Belder
This reverts commit b8a99f94167a25f63ae096d9d5e2cc9cf70cecef.
2010-12-20Stat watchers don't work on windows yetBert Belder
2010-09-29Safe constructor for ObjectWrapped classesBen Noordhuis
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
2010-05-10Revert "Check for strings.h"Ryan Dahl
This reverts commit 032f651824869c429cc24fbd9f7a23e84ed34b1f.
2010-05-10Check for strings.hRyan Dahl
2010-03-15Fix StatWatcher typoRyan Dahl
2010-03-15Use uniform watcher namesRyan Dahl