summaryrefslogtreecommitdiff
path: root/src/node_object_wrap.h
Commit message (Collapse)AuthorAgeFilesLines
* src, test: fix up ObjectWrap, `make test-addons`Ben Noordhuis2014-03-141-6/+9
| | | | | | | | | | V8 was upgraded from 3.22 to 3.24 in commit 1c7bf24. Upgrade source files in test/addons/ and automatically generated tests from doc/api/addons.markdown to the new V8 API. This coincidentally fixes a bug in src/node_object_wrap.h where it was still using the old V8 weak persistent handle interface, which is gone in 3.24.
* src: update to v8 3.24 APIsFedor Indutny2014-03-131-1/+1
|
* win: fix ObjectWrap for latest v8Scott Blomquist2013-10-291-10/+1
| | | | | | | We need to keep ObjectWrap around for module authors (we think), but v8 3.21 broke node_object_wrap.h with respect to MSVC. Coincidentally, we no longer use ObjectWrap at all in core, and native modules might as well use their own entirely internal implementation if they need it.
* cpplint: disallow if one-linersFedor Indutny2013-10-171-2/+4
|
* src: fix multi-base class ObjectWrap::Unwrap<T>()Ben Noordhuis2013-09-061-1/+5
| | | | | | | | | | | | | | Fix pointer unwrapping when T is a class with more than one base class. Before this commit, the wrapped void* pointer was cast directly to T* without going through ObjectWrap* first, possibly leading to a class instance pointer that points to the wrong vtable. This change required some cleanup in various files; some classes used private rather than public inheritance, others didn't derive from ObjectWrap at all... Fixes #6188.
* src: lint c++ codeFedor Indutny2013-07-311-7/+7
|
* lib, src: upgrade after v8 api changeBen Noordhuis2013-07-061-34/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: upgrade after v8 api changeBen Noordhuis2013-06-121-7/+6
| | | | | The prototype of v8::Persistent<T>::MakeWeak() has changed. Update the code in src/ to follow suit.
* src: unexport node_isolateBen Noordhuis2013-06-071-14/+15
| | | | | | | | | | | | Commit 0bba5902 accidentally (or maybe erroneously) added node_isolate to src/node.h and src/node_object_wrap.h. Undo that, said variable is not for public consumption. Add-on authors should use v8::Isolate::GetCurrent() instead. I missed that while reviewing. Mea culpa. Fixes #5639.
* Merge branch 'v0.10'Fedor Indutny2013-04-121-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: ChangeLog deps/uv/src/version.c src/node.h src/node_crypto.cc src/node_crypto_bio.cc src/node_crypto_bio.h src/node_object_wrap.h src/node_version.h
| * src: don't SetInternalField() in ObjectWrap dtorBen Noordhuis2013-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call SetPointerInInternalField(0, NULL) rather than SetInternalField(0, Undefined()). Fixes the following spurious NULL pointer dereference in debug builds: #0 0x03ad2821 in v8::internal::FixedArrayBase::length () #1 0x03ad1dfc in v8::internal::FixedArray::get () #2 0x03ae05dd in v8::internal::Context::global_object () #3 0x03b6b87d in v8::internal::Context::builtins () #4 0x03ae1871 in v8::internal::Isolate::js_builtins_object () #5 0x03ab4fab in v8::CallV8HeapFunction () #6 0x03ab4d4a in v8::Value::Equals () #7 0x03b4f38b in CheckEqualsHelper () #8 0x03ac0f4b in v8::Object::SetInternalField () #9 0x06a99ddd in node::ObjectWrap::~ObjectWrap () #10 0x06a8b051 in node::Buffer::~Buffer () #11 0x06a8afbb in node::Buffer::~Buffer () #12 0x06a8af5e in node::Buffer::~Buffer () #13 0x06a9e569 in node::ObjectWrap::WeakCallback ()
* | src: add node_isolate to remaining scopesTrevor Norris2013-04-101-1/+1
| |
* | bindings: update apiTrevor Norris2013-03-201-12/+16
|/ | | | | | | | | | | | | | | | | | | | | 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-2/+2
|
* object_wrap: add missing HandleScopeFedor Indutny2013-01-041-0/+2
| | | | | | by Sven Panne's suggestion, see [0] for details. [0]: https://code.google.com/p/v8/issues/detail?id=2468
* bindings: update to new v8 apisFedor Indutny2013-01-021-2/+2
| | | | | GetPointerFromInternalField() is deprecated now, we should use GetAlignedPointerFromInternalField().
* unix: don't explicitly instantiate v8::Persistent<x> templatesBert Belder2012-08-201-2/+5
| | | | | | These explicit instantiations were added to make MSVC happy. It turns out that some older versions of gcc and llvm now complain about duplicate symbols, so we instantiate these templates only when MSVC is used.
* windows: avoid MSVC warnings about templates not having a dll interfaceBert Belder2012-08-171-0/+6
|
* core: use proper #include directivesBen Noordhuis2012-03-101-2/+2
|
* Fixes #2140. Fix illumos build.Ryan Dahl2011-11-171-0/+1
|
* Windows: make Buffer and ObjectWrap available to compiled extensionsBert Belder2011-11-171-1/+1
| | | | Closes GH-2036
* ObjectWraps should be MarkIndependentRyan Dahl2011-09-051-0/+1
|
* Update copyright headersRyan Dahl2011-03-141-0/+21
|
* ClearWeak on ObjectWraps. I /think/ this is the correct semanticsRyan Dahl2010-10-041-1/+3
|
* Fix style in node_object_wrap.hRyan Dahl2010-09-131-8/+10
|
* Use SetPointerInInternalFieldRyan Dahl2010-09-091-3/+2
|
* Allow ObjectWrap destructors before Wrap()Ryan Dahl2010-06-041-3/+6
|
* Create a public Buffer constructor for use in addons.Ryan Dahl2010-05-241-1/+0
|
* ObjectWrap fixed - buffers working!Ryan Dahl2010-01-271-17/+12
| | | | Hot bug fix from net2 branch.
* Attach/Detach -> Ref/UnrefRyan Dahl2009-12-071-13/+13
|
* Prefix all source files with node_Ryan Dahl2009-10-271-0/+92