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
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
Stefan Siegl
449d66ca01
Don't force garbage collection on shutdown.
...
Doing so causes crashes on Windows and isn't needed anymore
anyways, since we have started tracking weak references
meanwhile.
2014-11-14 00:05:58 +01:00
Stefan Siegl
d03641254d
Use alloca for variable-size array on stack
2014-11-13 01:21:15 +01:00
Stefan Siegl
83a17b5e6a
libplatform stuff not needed on Windows
2014-11-13 00:31:26 +01:00
Stefan Siegl
c339d51924
Drop old-age PHP_V8_API_VERSION #ifdef
2014-10-19 12:20:10 +00:00
Stefan Siegl
f6310f9994
Get rid of V8JS_NEW macro.
2014-10-19 11:58:21 +00:00
Stefan Siegl
16af153c3e
Merge branch 'cscott/issue-64' (ctx_lifecycle test).
...
Test adapted to current behaviour of V8Js, that the situation is
properly handled, but not by keeping objects valid, but by
invalidating all of them.
2014-10-18 20:28:06 +00:00
Stefan Siegl
7d13c75073
efree resource memory
2014-09-20 22:52:48 +02:00
Stefan Siegl
d8a6467903
TSRM/ZTS fixes
2014-09-20 22:52:47 +02:00
Stefan Siegl
47b433efe8
Restore clean unwind state after unwinding.
2014-09-20 18:42:09 +00:00
Stefan Siegl
c91f96a439
Merge pull request #108 from stesie/fix-commonjs-module-reuse
...
Fix module caching, closes #107
2014-09-20 15:05:31 +02:00
Stefan Siegl
11f7311ab8
Use php_v8js_compile_script for checkString.
2014-09-20 12:22:56 +00:00
Stefan Siegl
9cb3711c66
Merge remote-tracking branch 'rosmo/compile-script-201409', closes #95
2014-09-20 12:22:31 +00:00
Stefan Siegl
eda74908cc
Fix module caching, closes #107
...
Use v8::Persistent handle to keep module instances around.
Objects cannot be shared between isolates anyhow, hence moved
modules_loaded map from global V8JSG structure to php_v8js_ctx.
Besides fixes a use-after-free on normalised_module_id.
2014-09-19 22:36:27 +00:00
Stefan Siegl
06371e4126
Include libplatform.h only for v8 >= 3.29.36
2014-09-17 16:47:33 +02:00
Stefan Siegl
14600d3be3
Initialize v8 platform as needed
...
See http://comments.gmane.org/gmane.comp.lang.javascript.v8.general/8029
for more information.
2014-09-17 00:45:24 +02:00
Taneli Leppa
200c16c30e
Fixed script destructor and free resource struct when done.
2014-09-16 17:11:13 +03:00
Taneli Leppa
de8b0666a6
Some changes to how V8 contexts are managed.
2014-09-16 17:10:18 +03:00
Taneli Leppa
7310c93c1e
Deprecate V8Js::checkString() in favour of compileString() and add tests.
2014-09-16 17:10:15 +03:00
Taneli Leppa
bd7d649d90
Added new functions V8Js::compileString() and V8Js::executeScript().
...
Conflicts:
php_v8js_macros.h
2014-09-16 17:09:58 +03:00
Stefan Siegl
ebcb6dc211
Keep track of V8Object/V8Function instances
...
Disallow access to these once the V8Js object has been destroyed.
2014-08-11 03:11:02 +02:00
Stefan Siegl
a72a180596
Keep a list of disposed isolates and make sure not to use disposed isolates.
2014-08-10 23:48:54 +02:00
Stefan Siegl
133ad4a7b5
Merge remote-tracking branch 'rosmo/dispose-isolate'
2014-08-10 22:13:47 +02:00
Stefan Siegl
137a6732c6
IdleNotification is on Isolate now
2014-08-10 13:36:07 +02:00
Stefan Siegl
e25e5264f6
Make compatible with V8 3.28.23, fixes #99
2014-08-10 11:57:20 +02:00
Taneli Leppa
dbe477fc8e
Exit current isolate on fatal V8 error.
2014-07-01 10:48:06 +03:00
Taneli Leppa
03728d8bbd
Dispose isolate when freeing V8Js object.
2014-07-01 09:20:45 +03:00
Stefan Siegl
847ac7677c
Initialize V8JSG(old_error_handler) on ZTS, refs #94
2014-05-23 00:06:28 +02:00
Stefan Siegl
659c0fb601
Code folding marks and comments
2014-04-13 22:59:35 +02:00
Stefan Siegl
35d8b815f8
Store error message and re-throw with original type & message
2014-04-13 21:46:31 +02:00
Stefan Siegl
dfd8a1f386
Use V8JSG instead of global variable.
2014-04-12 09:22:58 +02:00
Stefan Siegl
a49fa8ce02
Unwind V8 execution context on fatal error, refs #87
...
This is yet a first hack to prove applicability. Currently
unwind environment is held in a global variable, i.e. solution
is neither thread safe nor reentrant yet.
2014-04-12 00:02:43 +02:00
Stefan Siegl
c866e67313
Call INIT_ZVAL on stack-allocated zval
2014-04-11 20:15:51 +02:00
Stefan Siegl
0355a95c78
Fix strdup+getenv behaviour; multi api version support, closes #86
2014-03-22 19:09:53 +01:00
Stefan Siegl
ddbef50ea6
Merge remote-tracking branch 'rosmo/master'
2014-03-22 18:44:13 +01:00
Stefan Siegl
1186e7951f
Make compatible with V8 3.25.12, fixes #88
2014-03-22 17:58:38 +01:00
Stefan Siegl
bc86ce9e44
Clear persistent cells with weak references correctly, refs #88
2014-03-22 17:41:00 +01:00
Stefan Siegl
4c64bc4ad9
Make compatible with V8 3.24.10, fixes #83
2014-03-22 00:07:53 +01:00
Taneli Leppa
da53c90f88
Added new "v8js.use_date" ini setting to convert PHP DateTime objects to Javascript Date objects
...
when set as V8JS object properties.
2014-03-20 16:06:18 +02:00