Commit Graph
19 Commits
Author SHA1 Message Date
Ben Noordhuis cd96f0aba8 src: don't SetInternalField() in ObjectWrap dtor
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 ()
2013-04-10 15:37:30 +02:00
Ben Noordhuis 51f6e6a9b3 src, test: downgrade to v8 3.14 api 2013-02-25 23:45:02 +01:00
Fedor Indutny 97056c064f object_wrap: add missing HandleScope
by Sven Panne's suggestion, see [0] for details.

[0]: https://code.google.com/p/v8/issues/detail?id=2468
2013-01-04 16:39:24 +04:00
Fedor Indutny 5e57bcc3ce bindings: update to new v8 apis
GetPointerFromInternalField() is deprecated now, we should use
GetAlignedPointerFromInternalField().
2013-01-02 12:13:46 +04:00
Bert Belder 772b3bf4c8 unix: don't explicitly instantiate v8::Persistent<x> templates
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.
2012-08-20 19:13:05 +03:00
Bert Belder e8fd808dfb windows: avoid MSVC warnings about templates not having a dll interface 2012-08-17 01:02:03 +02:00
Ben Noordhuis ff4a9d381d core: use proper #include directives 2012-03-10 00:14:14 +01:00
Ryan Dahl b0030af135 Fixes #2140. Fix illumos build. 2011-11-17 11:39:34 -08:00
Bert Belder 3e696d189c Windows: make Buffer and ObjectWrap available to compiled extensions
Closes GH-2036
2011-11-17 00:54:42 +01:00
Ryan Dahl 061811f328 ObjectWraps should be MarkIndependent 2011-09-05 14:40:30 -07:00
Ryan Dahl 55048cdf79 Update copyright headers 2011-03-14 17:37:05 -07:00
Ryan Dahl dbf0d6bb70 ClearWeak on ObjectWraps. I /think/ this is the correct semantics 2010-10-04 12:52:46 -07:00
Ryan Dahl efdd73c8e4 Fix style in node_object_wrap.h 2010-09-13 11:40:04 -07:00
Ryan Dahl 5d42cc3a44 Use SetPointerInInternalField 2010-09-09 15:47:37 -07:00
Ryan Dahl 935f8437fd Allow ObjectWrap destructors before Wrap() 2010-06-04 14:30:59 -07:00
Ryan Dahl 3768aaaea4 Create a public Buffer constructor for use in addons. 2010-05-24 13:26:18 -07:00
Ryan Dahl b06dda1f5e ObjectWrap fixed - buffers working!
Hot bug fix from net2 branch.
2010-01-27 18:33:15 -08:00
Ryan Dahl c1baa70fe5 Attach/Detach -> Ref/Unref 2009-12-07 17:55:19 +01:00
Ryan Dahl a5df0f6a65 Prefix all source files with node_ 2009-10-27 11:46:58 +01:00