0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-12-22 14:01:53 +00:00
Commit Graph

95 Commits

Author SHA1 Message Date
Stefan Siegl
7887ec6475 Merge branch 'php7' into php8 2023-02-03 19:25:54 +01:00
Stefan Siegl
dd536bc5ce
Merge pull request #487 from stesie/exception-proxy-class
introduce V8Js::setExceptionProxyFactory
2022-06-27 18:04:14 +02:00
Stefan Siegl
712f54113b Merge branch 'php7' of github.com:phpv8/v8js into php8 2022-06-01 08:10:27 +02:00
Stefan Siegl
4c026f3fb2 use isolate version of v8::ScriptOrigin 2022-06-01 08:07:48 +02:00
Stefan Siegl
7422ef2383 run exceptions thrown in require() through proxy factory as well 2022-06-01 08:04:41 +02:00
Stefan Siegl
6be2206aab eliminate PHP_MAJOR_VERSION checks 2022-05-30 14:15:00 +02: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
Timothy Pace
3955409f56 Remove deprecated Context versions of ToBoolean and BooleanValue 2020-02-13 16:42:40 -08:00
Christiano Becker
d36aa6c9d5 Update v8js_methods.cc
* require() method: check when Module Loader returns an array (ex: require on a .json file) and map to array to JavaScript
2018-12-03 11:30:22 -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
Stefan Siegl
313ad1e258
cleanup: remove no longer needed modules_base from ctx, refs #349 2018-02-01 19:43:36 +01:00
Stefan Siegl
48a763d6db
pass module_base directly via FunctionTemplate, closes #349 2018-02-01 19:39:26 +01:00
Stefan Siegl
7663fb6888
support native modules 2018-01-05 21:44:40 +01:00
Stefan Siegl
b12a2fb4e3
Merge remote-tracking branch 'stesie/require-exception-handling' into php7 2017-11-26 12:24:46 +01:00
Stefan Siegl
1c7e355937
allow modules to return arbitrary values 2017-11-12 16:26:18 +01:00
Stefan Siegl
384ec9b1b6
use "this = module.exports" for modules 2017-11-12 16:20:24 +01:00
Stefan Siegl
f3a46ff833
re-use global context for modules + provide module.exports 2017-11-12 16:14:32 +01:00
Stefan Siegl
096454fdf4
Fix deprecated API calls 2017-04-23 22:50:00 +02: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
3761657335 update copyright years of changed files 2017-03-11 10:17:10 +01:00
Stefan Siegl
7625d9b94f v8js_methods: add size checks + precission down casts 2017-03-10 23:08:42 +01:00
Stefan Siegl
5ae48bbda7 Fix refcounting, use zval_ptr_dtor, closes #250 2016-08-12 01:02:56 +02:00
Stefan Siegl
9fd201eb16 forward exceptions thrown in module normaliser 2016-07-03 22:57:11 +02:00
Stefan Siegl
7dcebdd927 forward exceptions thrown in module loader 2016-07-03 22:52:50 +02:00
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
2e5a565237 Remove (meanwhile) unreferenced local variables 2016-05-26 21:53:17 +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
b21ba328d0 Don't call ObjectTemplate.Set with Object instances, fixes #230
This works fine with V8 < 5.2.50 somehow, but is now (properly) detected
and causing V8 to bail out.  Fixed by always setting templates on
other templates and finally use Global-Proxy on context to get the
actually created object instances.
2016-05-22 13:27:48 +02:00
Stefan Siegl
c804b16e4c fix compiler warnings 2016-03-26 12:11:11 +01: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
2d34adb91f Merge remote-tracking branch 'origin/master'
This primarily ports features introduced with V8Js 0.4.0
to the PHP7 branch.
2015-12-31 20:25:24 +01:00
Stefan Siegl
3108d3947d Fix output of var_dump on regexp (V8 > 4.8)
Newer V8 versions' toString() converts RegExp objects
just to [object RegExp] (instead of the actual regexp
as before).  Work-around by calling GetSource() on the
regexp and create former outhway that way.
2015-12-30 14:59:37 +01:00
Stefan Siegl
67a9de01bd Allow custom module normalisation 2015-12-06 13:55:13 +01:00
Stefan Siegl
f258980399 Accept empty string as module source
This might be perfectly valid, if you're using a third-party module,
which requires a module yet doesn't use it in the code paths hit
and hence you just want to stub it out.
2015-12-06 13:25:43 +01:00
Stefan Siegl
4853c6d17f Set script identifier as String, not Symbol
Otherwise long module identifiers might get cut off.
2015-12-06 13:23:14 +01:00
Stefan Siegl
bf58fe67c1 wrap module loading in zend_try/zend_catch, closes #178 2015-12-04 22:09:04 +01:00
Stefan Siegl
39fff2301e Use module id as JsFileName for V8
This way the information to V8JsScriptException instances are way
more clear since they contain the name of the module that caused
the exception.
2015-12-04 21:46:54 +01:00
Stefan Siegl
2f0b8e2873 Make var_dump command available to modules as well 2015-12-04 21:37:51 +01:00
Stefan Siegl
227ad57163 prefer V8JS_ZSTR over V8JS_STRL(Z_STRVAL), refs #180 2015-12-04 20:14:47 +01:00
Stefan Siegl
059e0500fb Merge remote-tracking branch 'origin/master' into php7 2015-11-29 12:21:40 +01:00
Stefan Siegl
670554306a Fix tests/var_dump.phpt
Recent V8 versions (e.g. 4.8.253 or 4.9.19) consider
`IsFunction() = true` for Closure objects from PHP; but earlier
versions didn't.

This ensures consistent var_dump behaviour (sticking to the
behaviour with older V8 versions).
2015-11-28 15:27:35 +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