... and hence remove all #ifdef hell. Those versions didn't have
security support by Google anyhow, and it helps to drastically
shrink the test matrix.
This does *not* seem to depend on whether V8 itself was compiled
with support for snapshots or not.
Therefore use PHP_V8_USE_EXTERNAL_STARTUP_DATA only to mark
whether we need to provide external snapshot data to V8.
We don't know whether the V8Js object dtor or the script (resource)
dtor is called first. Nevertheless they depend on each other as
we must not simply Reset the persistent v8::Script if the v8::Isolate
was disposed before.
Now the V8Js dtor iterates over all script resources and resets the
persistent v8::Script instances; leaving an invalidated resource
object (which cannot be called anymore).
Without the compare function std::map simply compares one
pointer to another. However we need to compare the actual
strings.
Besides we must not efree normalised_module_id on return
of require method, since the pointer was added to
modules_loaded (and is valid until destruction of V8Js
class); instead it is now freed during V8Js object destruction.
Splits longish v8js.cc file into pieces. It used to contain the
definitions of all V8Js exception classes, the V8Js class itself as
well as the V8Object/V8Function classes... besides the module setup
code itself.
This change factors out all exception class definitions into a
seperate pair of files (v8js_exceptions.*).
The V8Js class definition itself is moved to v8js_class.* pair,
with the v8 init & call code moved to v8js_v8.* pair
and the watchdog timer to v8js_timer.* pair.
The V8Object/V8Function code was moved to v8js_v8object_class.*
pair, not differentiating between the two like before.