@@ -78,11 +78,9 @@ class V8Js
78
78
* Initializes and starts V8 engine and returns new V8Js object with it's own V8 context.
79
79
* @param string $object_name
80
80
* @param array $variables
81
- * @param array $extensions
82
- * @param bool $report_uncaught_exceptions
83
81
* @param string $snapshot_blob
84
82
*/
85
- public function __construct($object_name = "PHP", array $variables = [], array $extensions = [], $report_uncaught_exceptions = TRUE, $snapshot_blob = NULL)
83
+ public function __construct($object_name = "PHP", array $variables = [], $snapshot_blob = NULL)
86
84
{}
87
85
88
86
/**
@@ -177,30 +175,8 @@ class V8Js
177
175
178
176
/** Static methods **/
179
177
180
- /**
181
- * Registers persistent context independent global Javascript extension.
182
- * NOTE! These extensions exist until PHP is shutdown and they need to be registered before V8 is initialized.
183
- * For best performance V8 is initialized only once per process thus this call has to be done before any V8Js objects are created!
184
- * @param string $extension_name
185
- * @param string $code
186
- * @param array $dependencies
187
- * @param bool $auto_enable
188
- * @return bool
189
- */
190
- public static function registerExtension($extension_name, $code, array $dependencies, $auto_enable = FALSE)
191
- {}
192
-
193
- /**
194
- * Returns extensions successfully registered with V8Js::registerExtension().
195
- * @return array|string[]
196
- */
197
- public static function getExtensions()
198
- {}
199
-
200
178
/**
201
179
* Creates a custom V8 heap snapshot with the provided JavaScript source embedded.
202
- * Snapshots are supported by V8 4.3.7 and higher. For older versions of V8 this
203
- * extension doesn't provide this method.
204
180
* @param string $embed_source
205
181
* @return string|false
206
182
*/
@@ -353,15 +329,6 @@ This behaviour can be changed by enabling the php.ini flag `v8js.use_array_acces
353
329
Snapshots
354
330
=========
355
331
356
- First of all snapshots are incompatible with extensions. So when you see
357
-
358
- #
359
- # Fatal error in ../src/snapshot/startup-serializer.cc, line 122
360
- # Check failed: !isolate->has_installed_extensions().
361
- #
362
-
363
- you need to remove all extension registrations.
364
-
365
332
First of all [ custom startup snapshots] ( https://v8project.blogspot.de/2015/09/custom-startup-snapshots.html )
366
333
is a feature provided by V8 itself, built on top of it's general heap snapshots feature. The idea is that, since
367
334
it is quite common to load some JavaScript library prior to any actual work to be done, that this library code
@@ -390,8 +357,7 @@ Exceptions
390
357
==========
391
358
392
359
If the JavaScript code throws (without catching), causes errors or doesn't
393
- compile, ` V8JsScriptException ` exceptions are thrown unless the ` V8Js ` object
394
- is constructed with ` report_uncaught_exceptions ` set ` FALSE ` .
360
+ compile, ` V8JsScriptException ` exceptions are thrown.
395
361
396
362
PHP exceptions that occur due to calls from JavaScript code by default are
397
363
* not* re-thrown into JavaScript context but cause the JavaScript execution to
0 commit comments