Description
The V8Js object is treated as a special case, and has its own handlers both on the V8 and the PHP sides. Now that V8 wrapping of PHP objects works much better (since f6a6d1e) I think it makes sense to remove a bunch of this code and just expose the V8Js object using the standard zval_to_v8js
wrappers.
However, there are some methods of the V8Js object which we don't want to directly expose to JS (like the executeString
method), so I'm actually proposing that the V8Js object reference a separate "blank" object for user properties. Adding/removing/querying properties from the PHP side would be proxied over to the user properties object. The V8 wrapper for V8Js would be the standard zval_to_v8js of the user properies object.
I think that would end up removing a bunch of now-redundant code (like all of v8js_variables.cc
) and simplifying the codebase (like php_v8js_write_property
etc).