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

57 Commits

Author SHA1 Message Date
Stefan Siegl
c459acd1ef Merge remote-tracking branch 'origin/master' into php7 2016-07-02 22:59:33 +02:00
Stefan Siegl
3278be8bee Add 'indent-tabs-mode: t' to file variables 2016-07-02 22:48:45 +02:00
Stefan Siegl
c4c5a19165 fix wrapped php object detection, closes #240
V8 since 5.3.337 returns InternalFieldCount() == -1 for
special objects like "arguments", which fulfilled the old
check.
2016-07-02 22:35:58 +02:00
Stefan Siegl
2e5a565237 Remove (meanwhile) unreferenced local variables 2016-05-26 21:53:17 +02:00
Stefan Siegl
8287a19c8d Remove conditional compilation of generator support
All supported V8 versions (>= 4.6.76) have support for JS generators,
therefore it's no longer needed.
2016-05-22 23:47:36 +02:00
Stefan Siegl
e9e90bac65 Merge remote-tracking branch 'origin/master' into php7
Conflicts:
      config.w32
      package.xml
      php_v8js_macros.h
      v8js.cc
      v8js_array_access.cc
      v8js_class.cc
      v8js_convert.cc
      v8js_exceptions.cc
      v8js_object_export.cc
      v8js_timer.cc
      v8js_v8.cc
      v8js_v8object_class.cc
2016-05-22 22:30:19 +02:00
Stefan Siegl
ec6c6d3eb3 Use WeakCallbackInfo
WeakCallbackData was deprecated and finally removed in V8 5.2
2016-05-22 20:08:28 +02:00
Stefan Siegl
05b96a96b8 Use internal fields instead of GetHiddenValue/SetHiddenValue
The latter were deprecated and removed in V8 5.2
2016-05-22 15:20:52 +02:00
Stefan Siegl
d44592910d Retain object indentity on 'return $this' 2016-03-25 19:15:25 +01:00
Stefan Siegl
d6394301b2 Pass back V8Object instances, don't re-wrap 2016-03-25 17:40:43 +01:00
Stefan Siegl
12903ca269 add V8Js::setAverageObjectSize method 2016-03-08 09:28:16 +01:00
Stefan Siegl
bf6effba63 Merge remote-tracking branch 'origin/master' into php7 2016-03-05 22:21:42 +01:00
Stefan Siegl
89399fa961 Disable generator export for V8 < 3.30 (not supported) 2016-01-09 14:17:48 +01:00
Stefan Siegl
80575beecc Don't create v8::HandleScope in v8js_wrap_generator 2016-01-09 14:05:19 +01:00
Stefan Siegl
a18ae9e853 Implement JS-side wrapper around PHP Generator objects 2016-01-09 12:50:40 +01:00
Stefan Siegl
3508f0c8e7 export public methods of classes derived from \V8Js, closes #183 2016-01-08 15:42:43 +01:00
Stefan Siegl
38b9c053a1 Enable V8Generator support on V8 >= 3.30.0 2016-01-08 00:12:06 +01:00
Stefan Siegl
f97a25b69c Test & implement PHP-side instantiation of JS generators 2016-01-07 22:57:50 +01:00
Stefan Siegl
98205461be Reorder includes for Visual Studio 2015, closes #194
C++ headers need to go first, since PHP headers redefine
"inline" which causes trouble with the C++ header files.
2016-01-06 09:01:35 +00:00
Stefan Siegl
2d9c831eeb Move zend_try block into v8::Unlocker block
If the v8::Unlocker block is within the zend_try block, then
v8::~Unlocker (dtor) is not called and hence V8 doesn't
re-aquire the lock.

Besides before we re-entered the isolate within zend_try
and hence *before* taking the lock.
2015-12-31 23:42:01 +01:00
Stefan Siegl
64bfa552ad Fix double free
Fix double free of `php_value` and free `php_ret_value` instead
(which otherwise leaks).
2015-12-30 15:54:47 +01:00
Stefan Siegl
5cba44ccd0 Merge remote-tracking branch 'origin/master' into php7
Conflicts:
	README.md
	v8js.cc
	v8js_class.cc
	v8js_exceptions.cc
	v8js_object_export.cc
	v8js_v8.cc
	v8js_v8object_class.cc
2015-10-11 02:09:59 +02:00
Stefan Siegl
71c43b6377 don't declare v8js_named_property_callback inline 2015-10-02 22:09:56 +02:00
Stefan Siegl
fcb056b5a5 Handle access of undeclared properties 2015-09-28 22:57:00 +02:00
Stefan Siegl
4002c3c1ae pass const char* instead of zend_string* 2015-09-28 22:44:30 +02:00
Stefan Siegl
f22ce7046d Fix duplicate context declaration 2015-09-23 19:56:48 +02:00
Stefan Siegl
83f51e5021 Merge pull request #156 from stesie/php-exception-behaviour
PHP->JS exception propagation
2015-09-23 19:40:23 +02:00
Stefan Siegl
8934db6dec Add v8js.compat_php_exceptions INI switch 2015-09-23 19:19:11 +02:00
Stefan Siegl
71f4b7ba05 Cache pseudo-Array FunctionTemplate as well 2015-09-01 15:53:21 +02:00
Stefan Siegl
794da39882 PHP7 adapt: handle ZEND_WRONG_PROPERTY_INFO special ptr 2015-08-30 02:08:38 +02:00
Stefan Siegl
1e8ce5a609 PHP7 adapt fix: use zend_hash_find_ptr on ce->function_table 2015-08-30 00:53:56 +02:00
Stefan Siegl
592d6528ca PHP7 adapt: fix zend_string memory leaks 2015-08-30 00:26:55 +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
f6105ff3cf v8js_class pt.1: pending_exception, module_loader, weak_objects, jsext 2015-08-24 22:05:27 +02:00
Stefan Siegl
2d0aa9b2cc adapt PHPJS_OBJECT_KEY from zval* to zend_object* 2015-08-24 21:13:35 +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
462eb623b3 Allow PHP exception to JS propagation 2015-08-22 15:16:02 +02:00
Stefan Siegl
f7a592052f Store flags in v8js_ctx class instead of v8 hidden value 2015-08-21 16:12:12 +02:00
Stefan Siegl
187b97060f Stop JS execution on PHP exceptions, refs #144 2015-08-21 15:55:52 +02:00
Stefan Siegl
b350871795 Correctly force to array on property writing, closes #137 2015-04-26 13:49:13 +02: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
6869d318b3 Rename V8Object stuff to v8js_v8object_XXX 2014-12-13 00:28:09 +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
Stefan Siegl
2b4750748e Merge branch 'array-access'
Conflicts:
	v8js_convert.cc
2014-12-10 20:02:33 +01:00
Stefan Siegl
603790f3dd Don't redefine default parameter
This compiles fine with gcc, but Visual C++ doesn't support it but
throws C2572 error instead.
See http://msdn.microsoft.com/en-us/library/acahh3ba.aspx
2014-12-10 19:41:59 +01:00