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
ad4d8e4110
v8js.cc: fix file permissions
2015-12-04 21:14:06 +01:00
Stefan Siegl
d9eb68b6f9
use ZSTR_LEN, ZSTR_VAL where possible, refs #180
2015-12-04 19:55:20 +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
b292715c75
Fix non-ZTS build.
2015-09-27 09:25:58 +02:00
Stefan Siegl
74440ed9f7
Move V8JSG extensions and v8_flags to process globals
2015-09-26 21:39:26 +02:00
Stefan Siegl
7d97c97d4c
Fix multi-threading, initialize V8 only once
2015-09-26 18:58:12 +02:00
Stefan Siegl
9275600ac9
Refactor php.ini bool option parsing
2015-09-23 20:01:43 +02:00
Stefan Siegl
8934db6dec
Add v8js.compat_php_exceptions INI switch
2015-09-23 19:19:11 +02:00
Stefan Siegl
fd6eeddc52
Adapt to PHP7
2015-08-29 17:48:26 +02:00
Stefan Siegl
8e84f99830
Adapt v8js.cc to PHP7 API
2015-08-24 21:35:29 +02:00
Stefan Siegl
cef7b0beba
Remove #include of no-more-existing file
2015-08-23 20:22:46 +02:00
Stefan Siegl
35e5fbb1fc
Don't call V8::ShutdownPlatform for V8 < 3.29.36
2015-08-08 12:12:18 +02:00
Stefan Siegl
4650273c90
Shutdown V8 on GSHUTDOWN
2015-08-02 19:42:03 +02:00
Stefan Siegl
3fff469174
Remove stray V8JS_DEBUG define
...
Currently it just enables RSHUTDOWN code that should print
memory usage statistics. However the code implements API calls
that aren't supported anymore (for a long time).
2015-07-25 23:40:50 +02:00
Stefan Siegl
4d17ba2566
Delete V8JSG(timer_thread) on shutdown, refs #138
2015-04-28 00:31:33 +02:00
Stefan Siegl
79f2056bc3
Properly stop timer thread, closes #138
...
We need to reset V8JSG(timer_stop) and V8JSG(timer_thread), otherwise
subsequent requests fail on multi-request SAPIs.
If we don't reset those, a subsequent request will not start a new timer
thread (as V8JSG(timer_thread) != NULL), but will try to join the thread
(once more) in GSHUTDOWN as V8JSG(timer_thread) still is non-NULL and
hence cause program termination.
2015-04-28 00:21:00 +02:00
Stefan Siegl
fd10356f62
Remove hard-coded PHP_V8_VERSION symbol
2015-03-13 16:18:12 +01:00
Stefan Siegl
5fb79ee994
Merge remote-tracking branch 'pecl/master'
...
Merging form pecl/v8js master branch to preillyme/v8js on Github
to get both heads on par.
Conflicts:
php_v8js_macros.h
2015-03-13 13:59:23 +01:00
Stefan Siegl
90c3b9db5f
Fix debug build; move debug stuff into seperate files
2015-03-11 14:06:21 +01:00
Stefan Siegl
2954de2db5
Remove php_ prefix to struct & type names
2014-12-13 01:18:42 +01:00
Stefan Siegl
3efec8d428
Remove CVS $Id$ comment lines
2014-12-13 00:45:05 +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
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
dfb6b1db46
Handle absent isolate in V8Js::__destruct
2014-12-11 19:14:33 +00: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
a2a9c30a11
Use zend_try/zend_catch to unwind v8 stack
2014-12-09 23:56:46 +00:00
Stefan Siegl
7ac12c4fbd
Unwind stack after fatal error in V8Function, closes #130
2014-12-09 22:40:53 +01:00
Stefan Siegl
2252169a98
Use isolate->RequestInterrupt to get heap size
2014-12-09 01:08:16 +01:00
Stefan Siegl
c17208c9c0
Allow to impose memory & time limits
2014-12-07 16:44:54 +01:00
Stefan Siegl
8945357d76
Allow to change & reset memory limits
2014-12-07 16:44:52 +01:00
Stefan Siegl
daf8788e0f
Allow to change & reset time limits
2014-12-07 16:05:58 +01:00
Stefan Siegl
ab6df6f14f
Use std::deque for timer_stack
...
In order to update limits at runtime we need the stack to be iterable.
2014-12-07 15:54:37 +01:00
Stefan Siegl
e617662293
Always push timer on stack to allow updates
2014-12-07 15:49:56 +01:00
Stefan Siegl
2a1ae43496
Use prologues for V8Function calls, closes #129
2014-12-07 15:19:47 +01:00
Stefan Siegl
acd00af78a
Refactor v8 call prologue/epilogue into function
2014-12-07 14:08:01 +01:00
Stefan Siegl
3a1f3e5237
Add setMemoryLimit & setTimeLimit setter methods
2014-12-07 13:25:52 +01:00
Stefan Siegl
0023c03280
Use v8::TryCatch if calling V8Function, refs #127
2014-12-01 22:12:22 +01:00
Stefan Siegl
f1dd5ad23b
Add basic ArrayAccess wrapping
2014-11-23 23:39:15 +01:00
Stefan Siegl
654a8b8039
Merge branch 'issue-126'
2014-11-22 13:27:26 +01:00
Stefan Siegl
65148db31f
Add StartColumn/EndColumn properties to script exception, closes #126
2014-11-22 12:56:00 +01:00
Stefan Siegl
b77ba3773c
Merge branch 'clear-exception'
2014-11-22 02:26:37 +01:00
Stefan Siegl
687459ba7c
Typo: dependancy, closes php.net bug 65725
2014-11-20 21:21:09 +01:00
Taneli Leppa
7ee8d69470
Added V8Js::clearPendingException().
2014-11-17 10:45:35 +02:00
Stefan Siegl
6ee72b6f0a
Use concurrency::wait on Windows to sleep.
...
The chrono + sleep_for implementation seems not to work,
due to bugs in chrono header file. And after all sleep_for
calculates a time_point for sleep_until, which calculates
the delta again and finally passes the number of
milliseconds to concurrency::wait ...
2014-11-14 00:08:30 +01:00