0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-08 15:48:40 +00:00
Commit Graph

133 Commits

Author SHA1 Message Date
Stefan Siegl
a91d2bc413 PHP7 adapt: fix registerExtension 2015-08-29 21:45:59 +02:00
Stefan Siegl
eca7656b7d PHP7 adapt: fix setModuleLoader 2015-08-29 21:00:13 +02:00
Stefan Siegl
b21acf770a PHP7 adapt: no fallback property_info any longer 2015-08-29 20:19:44 +02:00
Stefan Siegl
fe7e097d10 PHP7 adapt: use zend_string 2015-08-29 20:19:04 +02:00
Stefan Siegl
a0f3c2302c PHP7 adapt: initialize c->std.handlers as needed 2015-08-29 18:52:30 +02:00
Stefan Siegl
5477d780a3 PHP7 adapt v8js_v8object_class.cc 2015-08-29 16:47:37 +02:00
Stefan Siegl
916e068c4a PHP7 adapt v8js_object_export.cc 2015-08-29 11:57:53 +02:00
Stefan Siegl
78dd0a9ff0 Cache v8::FunctionTemplates created by v8js_named_property_callback 2015-08-27 14:46:27 +02:00
Stefan Siegl
b8c9badddb Adapt v8js_class.cc to PHP7 API 2015-08-25 23:38:09 +02:00
Stefan Siegl
3fa38e7b87 v8js_class.cc pt.2 for PHP7, zend_object_store_get_object stuff & script resource 2015-08-25 00:24:04 +02:00
Stefan Siegl
a10e601af3 adapt v8js_ctx custom object creation to PHP7 API 2015-08-24 22:19:15 +02:00
Stefan Siegl
f6105ff3cf v8js_class pt.1: pending_exception, module_loader, weak_objects, jsext 2015-08-24 22:05:27 +02:00
Stefan Siegl
8389e126b5 adapt to changed ZVAL_STRING/ZVAL_STRINGL/RETVAL_STRINGL macros 2015-08-23 21:14:49 +02:00
Stefan Siegl
45f7e18624 Remove conditional compilation for PHP_VERSION_ID < 7.0.0 2015-08-23 21:10:47 +02:00
Stefan Siegl
f7c33539c2 Improve PHP->JS->PHP exception back propagation 2015-08-23 15:09:21 +02:00
Stefan Siegl
462eb623b3 Allow PHP exception to JS propagation 2015-08-22 15:16:02 +02:00
Stefan Siegl
829bac9ddc Merge pull request #150 from stesie/issue-140
Fix module caching & memory leaks
2015-08-03 08:40:26 +02:00
Stefan Siegl
0deb7d1802 Track list of valid script object in ctx
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).
2015-08-02 23:35:47 +02:00
Stefan Siegl
cb7a1b8d6a Dispose persisted v8::Script object on resource dtor (memory leak) 2015-08-02 22:36:23 +02:00
Stefan Siegl
1f56c8e43c Don't only run dtor, really delete the object 2015-08-02 21:26:18 +02:00
Stefan Siegl
dd4996cd56 delete v8::Extension instance on shutdown 2015-08-02 19:42:42 +02:00
Stefan Siegl
3d89f0250d Provide key compare function for modules_loaded
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.
2015-08-01 17:49:11 +02:00
Stefan Siegl
22e90d1c50 Call v8::V8::SetArrayBufferAllocator for v8 4.4.10 & higher 2015-07-25 17:28:08 +02:00
Stefan Siegl
493e448bae Provide ArrayBufferAllocator for v8 4.4.44 (and later) 2015-07-25 16:04:25 +02:00
Stefan Siegl
e67f1f4c9c Fix handling of failed context creation, closes #136 2015-05-01 11:43:24 +02:00
Stefan Siegl
3726d233b8 return SUCCESS from PHP_MINIT_FUNCTION 2015-03-12 12:22:01 +01:00
Stefan Siegl
90c3b9db5f Fix debug build; move debug stuff into seperate files 2015-03-11 14:06:21 +01:00
Stefan Siegl
7b926a3d06 ForceDelete was removed, use normal Delete 2015-03-10 15:09:41 +01:00
Stefan Siegl
5b4aaa64f1 More php_v8js_ prefix cleanup 2014-12-13 01:37:25 +01:00
Stefan Siegl
2954de2db5 Remove php_ prefix to struct & type names 2014-12-13 01:18:42 +01:00
Stefan Siegl
d269809d8b Move types from php_v8js_macros.h to new headers 2014-12-13 00:43:19 +01:00
Stefan Siegl
f987cc7b4c Rename php_v8js_objects -> v8js_v8objects
* drop php_ prefix, currently used inconsistently anyways
* change "object" to "v8object" to clarify it's a JS object wrapped
  to a V8Object instance
2014-12-13 00:13:03 +01:00
Stefan Siegl
5ea36016fe code cleanup, part 1
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.
2014-12-13 00:11:02 +01:00