smalloc: cleanup checks/conversions
authorTrevor Norris <trev.norris@gmail.com>
Fri, 2 Aug 2013 17:11:35 +0000 (10:11 -0700)
committerTrevor Norris <trev.norris@gmail.com>
Wed, 7 Aug 2013 19:52:56 +0000 (12:52 -0700)
commitcd00064566f1233aee27896e8aac91097b37b3c7
tree9dc6d3e411b9f96c8b98b897208810070557aa46
parentb9150344ac35c77debb1c915a1b44df085c5cc29
smalloc: cleanup checks/conversions

* Moved the ToObject check out of smalloc::Alloc and into JS. Direct
  usage of that method is for internal use only and so can bypass the
  possible coercion.
* Same has been done with smalloc::SliceOnto.
* smalloc::CopyOnto will now throw if passed argument is not an object.
* Remove extra TargetFreeCallback function. There was a use for it when
  it was working with a Local<T>, but that code has been removed making
  the function superfluous.
lib/smalloc.js
src/smalloc.cc