v8 0.1.1

V8 JavaScript engine API for PHP


This extension brings V8 JavaScript engine API to PHP with some abstraction in mind and provides an accurate native V8 C++ API implementation available from PHP.

License: The MIT License (MIT)

Changes

In this release new methods added and some internal logic refactored.

As of this release, V8 >= 5.4.420 required.

Also, deprecated or soon to be deprecated API calls are removed in this release, see note on BC-breaking changes below.

- add V8\Isolate::IsInUse() method.
- add V8\AdjustableExternalMemoryInterface interface;
- add V8\ObjectValue::AdjustExternalAllocatedMemory() method;
- add V8\ObjectValue::GetExternalAllocatedMemory() method;
- add V8\FunctionTemplate::AdjustExternalAllocatedMemory() method;
- add V8\FunctionTemplate::GetExternalAllocatedMemory() method;
- add V8\ObjectTemplate::AdjustExternalAllocatedMemory() method;
- add V8\ObjectTemplate::GetExternalAllocatedMemory() method;
- rewrite callbacks structures to use std containers;
- use realistic external allocated memory value to notify isolate about based on callbacks structures size and optionally specified by user value.
- add V8\Value::TypeOf() method;
- add V8\ObjectValue::IsConstructor() method;
- add V8\ObjectValue::SetIntegrityLevel() method;
- add V8\CallbackInfo::InContext() method;
- add V8\ReturnValue::InContext() method;
- add V8\ReturnValue::Get() method;
- add V8\HeapStatistics::malloced_memory() method;
- add V8\HeapStatistics::peak_malloced_memory() method;
- properly shutdown in case of OOM;
- simplify V8\ReturnValue internals and integration with callbacks.

BC breaking changes:

- V8\ObjectValue::ForceSet() removed in a favor of V8\ObjectValue::DefineOwnProperty(), V8\ObjectValue::CreateDataProperty() and V8\ObjectValue::CreateDataPropertyIndex().