preillyme/v8js — pull request #109 by stesie (2014-09-20 23:52:01+00:00)
Title: Don't Z_ADDREF_P twice on same exported object

```
b = $a->a = new stdClass();
```

... leaks the stdClass instance, since we Z_ADDREF_P twice (since it's actually exported two times) ... however we get only one weak-object-callback from v8 if the JS object is deallocated (and hence we only delref once).

This changes the JS object construction to only Z_ADDREF_P if the object is exported for the first time.