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

111 Commits

Author SHA1 Message Date
Stefan Siegl
8edc8b65d8 Add missing include 2024-09-20 21:32:27 +02:00
Stefan Siegl
133bf61e05
Merge pull request #512 from chrisbckr/php8-v8js_to_zval_check_arraybuffer
Since ArrayBuffer has InternalFieldCount set to 2 by default, added !…
2023-02-27 12:09:49 +01:00
Christiano Becker
752cbdb8ac Since ArrayBuffer has InternalFieldCount set to 2 by default, added !isArrayBuffer() and !isArrayBufferView() to ensure that is PHP object 2023-02-27 08:03:22 -03:00
Christiano Becker
f696867dc2 Fixed tab-based indentation 2023-02-22 16:16:22 -03:00
Christiano Becker
34d944a9f5 toJSON: use zend_hash_find_ptr_lc instead of ZEND_HASH_FOREACH_STR_KEY_PTR 2023-02-22 16:13:13 -03:00
Christiano Becker
c59982f129 Added toJSON Symbol that calls jsonSerialize if the php class exported implements JsonSerializable interface 2023-02-21 09:02:39 -03:00
Christiano Becker
cfa5e722fb * Propagate exception when zend_read_property reads __get and throws an exception 2023-02-20 14:51:40 -03:00
Christiano Becker
fab7a68717 PHP 8.2 compatibility
* tests/array_access_002.phpt - added #[AllowDynamicProperties] to the class MyArray
* tests/js-construct-protected-ctor.phpt - some change on how pph8.2 Exepctions references the line that caused the exception, when some call have multiple lines (eg: the executeString in this test), now references the line where the command started (first line) instead of the last line.
* V8Js Object Export: added to not enumerate magic methods __serialize and __unserialize - this two methods was added to DateTime objects and was causing tests/var_dump.phpt failing.
2023-02-20 08:09:13 -03:00
Marek Skopal
e06b382bd0
Fixed build on PHP 8.0.x 2023-02-08 14:04:03 +01:00
Stefan Siegl
8aa6bc2357 Merge branch 'php8-exit_segfault' of https://github.com/chrisbckr/v8js into php8
Conflicts:
	v8js_object_export.cc
2023-02-03 19:31:07 +01:00
Stefan Siegl
7887ec6475 Merge branch 'php7' into php8 2023-02-03 19:25:54 +01:00
Christiano Becker
5a10dec698 When FLAG_PROPAGATE_PHP_EXCEPTIONS is set, check for unwind or graceful exit before propagate 2023-01-16 17:35:07 -03:00
Stefan Siegl
4bfe2ef3ce rename to setExceptionFilter 2022-06-24 12:04:11 +02:00
Stefan Siegl
ca38f724c8 handle exceptions thrown in proxy factory 2022-06-01 08:04:41 +02:00
Stefan Siegl
ac2b1cb238 introduce setExceptionProxyFactory 2022-06-01 08:04:41 +02:00
Stefan Siegl
9b3d1d1c8f remove SINCE74(...) and SINCE80(...) macro fluff 2022-05-30 14:25:37 +02:00
Stefan Siegl
6be2206aab eliminate PHP_MAJOR_VERSION checks 2022-05-30 14:15:00 +02:00
Stefan Siegl
10cd73a03d eliminate PHP_VERSION_ID checks for < 80000 etc 2022-05-30 14:11:28 +02:00
Albert
cb7b3dcc29 Optimize and fix test reference from @redbullmarky 2022-05-27 10:47:44 +08:00
Albert
1db8f8de5e Support PHP8.1+ 2022-05-23 15:41:57 +08:00
Albert
3d64f08536 optimize redundancy code and fix some unit test 2021-08-20 20:08:45 +08:00
Albert
97cc819ade support php8 2021-06-03 09:33:51 +08:00
waqasbelushi
e648f431ac
all test passed v8 8.9 2021-04-05 17:36:59 +02:00
Jan-E
672d6952fd make it compile with PHP 7.4 on Windows 2020-04-05 06:24:58 +02:00
Stefan Siegl
801c744885
Merge pull request #435 from timothympace/api_updates
Remove deprecated Context versions of ToBoolean and BooleanValue
2020-03-06 10:27:05 +01:00
Timothy Pace
3955409f56 Remove deprecated Context versions of ToBoolean and BooleanValue 2020-02-13 16:42:40 -08:00
Tyson Andre
7fd31e8b5a
Fix sprintf call for "converting parameter .. failed"
```
union _zend_function {
	zend_uchar type;	/* MUST be the first element of this struct! */
	uint32_t   quick_arg_flags;

	struct {
		zend_uchar type;  /* never used */
		zend_uchar arg_flags[3]; /* bitset of arg_info.pass_by_reference */
		uint32_t fn_flags;
		zend_string *function_name;
```
2020-01-03 12:22:39 -05:00
Tyson Andre
63d65a59ae
Pass pointer to (char*) instead of (zend_string*) to spprintf
I don't believe these error messages have any unit tests covering them.
Some may be unreachable in practice.

This might not be comprehensive - I didn't test other files.

```
struct _zend_class_entry {
	char type;
	zend_string *name;
```
2020-01-03 12:17:04 -05:00
Stefan Siegl
35398cc4e3
add zend_class_entry* to method_tmpls key, fixes #410 2019-06-22 19:15:05 +02:00
Stefan Siegl
9c45508183
omit use of deprecated apis 2018-09-13 14:01:15 +02:00
Stefan Siegl
ab6e2267af
adapt mandatory api changes for V8 7.0.276.3, refs #374 2018-09-12 15:43:48 +02:00
Jan-E
0c2b55d802 Add GC_(UN)PROTECT_RECURSION, move (un)protecting outside loops 2018-07-05 11:41:32 +02:00
Jan-E
826aaa689c Change to GC_IS_RECURSIVE for PHP 7.3 2018-07-05 11:30:20 +02:00
Stefan Siegl
f1e2c36a0a
Merge remote-tracking branch 'stesie/remove-compat-exceptions' into php7 2017-11-26 12:27:02 +01:00
Stefan Siegl
278b4fbedb
Merge remote-tracking branch 'remotes/stesie/global-object' into php7 2017-11-26 12:21:50 +01:00
Stefan Siegl
302bf1d0ff
remove v8js.compat_php_exceptions 2017-11-26 11:48:52 +01:00
Stefan Siegl
7a947fe9d1
rename v8js_tmpl_t -> v8js_function_tmpl_t 2017-11-12 15:22:39 +01:00
Stefan Siegl
8e8306ae3e
allow enumeration of methods
-> actually our properties said this shouldn't be possible
-> however v8js_named_property_enumerator enumerated the methods
-> older V8 versions listed the methods anyways
-> V8 6.3 started to not list the method now

refs #326
2017-09-24 13:59:34 +02:00
Jan-E
53533cd4dd remove ZEND_ACC_CLONE 2017-06-13 18:14:12 +02:00
Stefan Siegl
13e0b77015
Fix left-over deprecated API calls. 2017-04-24 20:43:52 +02:00
Stefan Siegl
51335bfa17 remove unused variable 2017-03-11 17:54:44 +01:00
Stefan Siegl
745126b5cb remove left-over TSRM stuff 2017-03-11 13:45:23 +01:00
Stefan Siegl
3e8ef5f684 remove V8JS_TSRMLS_FETCH 2017-03-11 13:43:30 +01:00
Stefan Siegl
24bb1761bf remove TSRMLS_DC, TSRMLS_CC 2017-03-11 13:35:21 +01:00
Stefan Siegl
d97832d9fb v8::Handle -> v8::Local 2017-03-11 13:31:40 +01:00
Stefan Siegl
288fe4d2a0 PHP Version 5 -> 7 2017-03-11 12:33:49 +01:00
Stefan Siegl
db7c81d4fa v8js_object_export: add size checks + precission down casts 2017-03-10 23:49:18 +01:00
Stefan Siegl
fa613c5cb2 Update links to old Github repo 2016-11-01 21:16:01 +01:00
Stefan Siegl
dbd97acf20 Merge pull request #242 from stesie/fix-php7.1alpha2
Fix build against PHP 7.1.0alpha2
2016-08-12 15:41:58 +02:00
Stefan Siegl
880b17a45c Merge pull request #243 from stesie/code-cleanup
fix compiler warnings
2016-08-12 15:41:27 +02:00