Skip to content

Commit

Permalink
API updates to include: setAverageObjectSize() as well as default array
Browse files Browse the repository at this point in the history
values.
  • Loading branch information
virgofx committed Apr 1, 2016
1 parent 5c3b447 commit a4647c2
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/V8Js.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class V8Js
* @param bool $report_uncaught_exceptions
* @param string $snapshot_blob
*/
public function __construct($object_name = 'PHP', array $variables = null, array $extensions = null, $report_uncaught_exceptions = true, $snapshot_blob = null)
public function __construct($object_name = 'PHP', array $variables = [], array $extensions = [], $report_uncaught_exceptions = true, $snapshot_blob = null)
{}

/**
Expand Down Expand Up @@ -99,6 +99,16 @@ public function setTimeLimit($limit)
public function setMemoryLimit($limit)
{}

/**
* Set the average object size (in bytes) for this V8Js object.
* V8's "amount of external memory" is adjusted by this value for every exported object. V8 triggers a garbage
* collection once this totals to 192 MB.
*
* @param int $average_object_size
*/
public function setAverageObjectSize($average_object_size)
{}

/**
* Returns uncaught pending exception or null if there is no pending exception.
*
Expand Down

0 comments on commit a4647c2

Please sign in to comment.