rvagg/nan — pull request #90 by rvagg (2014-04-15 13:39:15+00:00)
Title: GetFromPersistent and other NanAsyncWorker scope issues

Found my `Buffer`-related bug, although I don't fully understand it because it relates to `HandleScope` (which I don't confess to actually understand).

Having a `NanScope()` on `GetFromPersistent()` meant that when the object in question is a `Buffer`, we get back a handle that returns false for `Buffer::HasInstance(handle)`! This is only new behaviour in master so I don't know what's going on. Removing the `NanScope()` fixed it for me. I went ahead and added `NAN_INLINE` to these methods too and also make sure the `persistentHandle` is actually instantiated.

Interestingly, there were no real problems as far as I could tell, when the object in question isn't a `Buffer` so it's to do with `v8::Object#HasIndexedPropertiesInExternalArrayData()`. \*shrug\*

Also I think I might do a change from `SavePersistent()` to `SaveToPersistent()` to match `GetFromPersistent()` for the next release since we're going with breaking changes anyway and there aren't many people other than me actually using `NanAsyncWorker` out there!