0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-09-19 15:25:19 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
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
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
3508f0c8e7 export public methods of classes derived from \V8Js, closes #183 2016-01-08 15:42:43 +01: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
78dd0a9ff0 Cache v8::FunctionTemplates created by v8js_named_property_callback 2015-08-27 14:46:27 +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
Stefan Siegl
901268994a Implement isset behaviour on ArrayAccess objects 2014-11-30 22:43:56 +01:00
Stefan Siegl
1b027a525f Implement delete behaviour on ArrayAccess objects 2014-11-30 22:31:27 +01:00
Stefan Siegl
6399b49b3f Improve ArrayAccess enumeration
When enumerating an ArrayAccess-style object the array keys should be
returned, not the method names & properties of the PHP object.
2014-11-30 21:00:42 +01:00
Stefan Siegl
27d326a196 Fix ZTS build 2014-11-29 19:49:44 +00:00
Stefan Siegl
2b897e8bc4 Export extra methods on ArrayAccess
This merges the distinct code path for the export of ArrayAccess
capable PHP objects back into the "common" PHP object export code.
Sole difference is that the ArrayAccess-style object has index
property handlers as well as property bridging to Array.prototype.
2014-11-29 20:35:32 +01:00
Stefan Siegl
02d8ecc16e Split php_v8js_hash_to_jsobj into smaller pieces
php_v8js_hash_to_jsobj is called for all wrapping to JS objects, be it
a PHP associative array or a PHP object.  I've now splitted both parts
into seperate functions since they don't share any code any longer
anyways.
2014-11-29 16:38:45 +01:00
Stefan Siegl
fc583a8ec6 Move PHP to JS object wrapping into seperate file 2014-11-29 15:42:41 +01:00