@@ -78,11 +78,9 @@ class V8Js
7878 * Initializes and starts V8 engine and returns new V8Js object with it's own V8 context.
7979 * @param string $object_name
8080 * @param array $variables
81- * @param array $extensions
82- * @param bool $report_uncaught_exceptions
8381 * @param string $snapshot_blob
8482 */
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)
8684 {}
8785
8886 /**
@@ -177,30 +175,8 @@ class V8Js
177175
178176 /** Static methods **/
179177
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-
200178 /**
201179 * 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.
204180 * @param string $embed_source
205181 * @return string|false
206182 */
@@ -353,15 +329,6 @@ This behaviour can be changed by enabling the php.ini flag `v8js.use_array_acces
353329Snapshots
354330=========
355331
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-
365332First of all [ custom startup snapshots] ( https://v8project.blogspot.de/2015/09/custom-startup-snapshots.html )
366333is a feature provided by V8 itself, built on top of it's general heap snapshots feature. The idea is that, since
367334it 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
390357==========
391358
392359If 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.
395361
396362PHP exceptions that occur due to calls from JavaScript code by default are
397363* not* re-thrown into JavaScript context but cause the JavaScript execution to
0 commit comments