0
0
mirror of https://github.com/phpv8/v8js.git synced 2024-11-14 16:28:41 +00:00
Commit Graph

153 Commits

Author SHA1 Message Date
Stefan Siegl
1d1b87bda3 skip extensions_error.phpt on Windows 2016-01-06 13:26:55 +00:00
Stefan Siegl
c2a2cc341f Initialize libv8_platform for Windows as well
V8 doesn't work without libplatform anymore, even under
Windows.

Furthermore adapted two tests to \r\n vs. \n line
ending differences
2016-01-06 11:58:40 +00:00
Stefan Siegl
362eb0b806 Merge pull request #190 from stesie/warn-only-on-v8-errors
Don't abort PHP on fatal V8 errors, just warn about it
2015-12-31 21:42:00 +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
de23e8dba4 Don't abort PHP on fatal V8 errors, just warn about it
This way the PHP script can handle V8 errors gracefully
(and e.g. provide feedback to the user).

This especially changes behaviour when circular extension
dependencies happen (PHP code can go on, just V8 fails
to start).  This also fixes memory leaks of V8 and V8Js
itself caused by bailing out directly otherwise.
2015-12-30 17:53:46 +01:00
Stefan Siegl
3c5508b956 Provide correct "this" on V8Object method invocation, closes #185 2015-12-26 12:16:17 +01:00
Stefan Siegl
67a9de01bd Allow custom module normalisation 2015-12-06 13:55:13 +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
97a9a2cc74 tests/pthreads_001: don't test pthread ext internals 2015-12-04 19:22:29 +01:00
Stefan Siegl
059e0500fb Merge remote-tracking branch 'origin/master' into php7 2015-11-29 12:21:40 +01:00
Matt Kynaston
a58f944804 Experiment to see if #172 is easy to fix 2015-11-03 17:35:30 +00:00
Stefan Siegl
296b9078ff fix exception back-propagation on PHP7 2015-10-11 14:59:25 +02: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
b8726409f4 Throw V8JsException if v8 context cannot be created
We used to reset This to NULL, which never reallt was supposed to work
and PHP doc explicitly tell to not touch EX(This)
2015-10-03 00:01:12 +02:00
Stefan Siegl
afa52c07bc Remove hard-coded full pathnames from test 2015-10-02 22:29:27 +02:00
Stefan Siegl
cbbce91ffd Rename constructor functions to __construct 2015-09-28 22:56:22 +02:00
Stefan Siegl
7d97c97d4c Fix multi-threading, initialize V8 only once 2015-09-26 18:58:12 +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
11155a6a51 PHP7 adapt: changed fatal error messages 2015-08-29 21:21:43 +02:00
Stefan Siegl
49acfc6f22 Adapt ctx_lifetime test to PHP7: changed exception handling 2015-08-29 20:19:22 +02:00
Stefan Siegl
53995ac616 Make FLAG_FORCE_ARRAY not affect V8Function objects, #closes 160 2015-08-26 18:41:38 +02:00
Stefan Siegl
790735f04a Fix tests/php_exceptions_005.phpt 2015-08-23 19:30:47 +02:00
Stefan Siegl
c033000aea Fix tests/exception_propagation_2.phpt
The test relied on weird behaviour that PHP exceptions shouldn't stop
JavaScript code execution.  Since JavaScript execution is now stopped,
the JavaScript catch handler is not executed anymore.
2015-08-23 18:05:46 +02:00
Stefan Siegl
b7dde1b1db Handle thrown PHP objects, that are no exceptions 2015-08-23 17:40:27 +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
187b97060f Stop JS execution on PHP exceptions, refs #144 2015-08-21 15:55:52 +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
441f7b7fab v8js_commonjs_split_terms: use pointer comparison instead of strlen
The strlen usage on term obviously was wrong here, since the term
string is not null-terminated at that place.
2015-08-01 19:54:23 +02:00
Stefan Siegl
ea3ec4bd65 Fix commonjs memory leaks (and increase test coverage to 100%) 2015-08-01 19:30:55 +02:00
Stefan Siegl
3324490a79 test issue_127_001.phpt doesn't depend on ext_json 2015-08-01 18:47:44 +02:00
Stefan Siegl
d8e239a756 test per isolate module cache seperation 2015-08-01 17:57:57 +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
34242c5d60 skip extensions_error test for v8 version < 3.30 2015-07-25 18:16:04 +02:00
Stefan Siegl
81018372e4 Adapt test to changed v8 error message
Added a "%s" so both messages are matched:

 * Extension or internal compilation error: MakeReferenceError in handlebars at line 1.
 * Extension or internal compilation error in handlebars at line 1.
2015-07-25 16:01:54 +02:00
Stefan Siegl
e67f1f4c9c Fix handling of failed context creation, closes #136 2015-05-01 11:43:24 +02:00
Stefan Siegl
b350871795 Correctly force to array on property writing, closes #137 2015-04-26 13:49:13 +02:00
Stefan Siegl
af58f4ec9e Catch serialization of V8Function instances 2014-12-11 22:28:01 +01:00
Stefan Siegl
73d022cca1 Test unserialization with properties 2014-12-11 22:15:38 +01:00
Stefan Siegl
c0d1e2fa6d Catch serialization of V8Object instances 2014-12-11 20:58:53 +01:00
Stefan Siegl
1386c96d26 Catch serialization of V8Js object, closes #119 2014-12-11 19:30:06 +01:00
Stefan Siegl
0ea210f94e Throw V8JsException if source is not a script 2014-12-11 18:05:37 +01:00
Stefan Siegl
c28c9f50f1 introduce V8JsException class 2014-12-11 18:00:43 +01:00
Stefan Siegl
2b4750748e Merge branch 'array-access'
Conflicts:
	v8js_convert.cc
2014-12-10 20:02:33 +01:00
Stefan Siegl
a7fbe9dde4 Fix path seperator for Windows 2014-12-10 19:46:15 +01:00
Stefan Siegl
8b89a7b691 increase time limit to start engine 2014-12-10 19:27:04 +01:00
Stefan Siegl
1613570ced Add test on die() call, refs #122 2014-12-10 01:10:30 +01:00
Simon Best
dbea6fc122 Correct name of memory limit test. 2014-12-09 22:53:06 +01:00