preillyme/v8js — pull request #43 by stesie (2013-10-03 15:12:49+00:00)
Title: Adopt V8 API changes (up to 3.22.6)

hey there,

this patch adopts changes to V8's API to make V8Js compile with V8 version 3.22.6 (addressing issue #40) and pass the test suite.

Especially the Persistent-API has changed, a Persistent neither may be silently used as a Local anymore nor can it be assigned from one to another. Since the function cache map requires Persistent-handles to be copyable I used the CopyablePersistentTraits for it. All other parts use the non-copyable versions.

Since Persistent-handles need to be copied to (new) Local-handels HandleScopes are required here and there.

Last not least the Locker::Locker() constructor was removed in favour of the Isolate-variant. I just removed the instance from the timer thread, since it doesn't seem to be needed (to me, but I'm not 100% sure to be honest). As far as I get the Locker::Locker() behaviour it just created yet another Isolate internally, ... for no need here as it just reads time and memory consumption from other isolates.

This change breaks compatibility with V8 versions < 3.21.12, I wonder whether this is acceptable!? On the other hand it would mean quite some extra work to support earlier versions.

cheers
stesie