Template::Set() property to set must be defined either as a primitive value, or a template. Before that property value was filtered only by argument type (V8\Data) which also let objects in, which caused segfault/abort from v8 internals.
During the fix it came up that V8\Value was used as a replacement for javascript undefined value, however, from ECMA and V8 perspective it's not correct as undefened should be primitive and objects should not. So whole values inheritance chain had to be fixed: now V8\Value, V8\PrimitiveValue and V8\NameValue are declared as abstract and MUST NOT be instantiated in userland and their usage should be type hinting and type checking only.
Changes list that affect API:
* Make V8\Value, V8\PrimitiveValue and V8\NameValue abstract;
Introduce separate class for undefined value - V8UndefenedValue;
Fix V8\Tempalte::Set() to do not accept non-primitive values;
* - BC-breaking or potentially BC-breaking changes*
Template::Set()
property to set must be defined either as a primitive value, or a template. Before that property value was filtered only by argument type (V8\Data
) which also let objects in, which caused segfault/abort from v8 internals.During the fix it came up that
V8\Value
was used as a replacement for javascriptundefined
value, however, from ECMA and V8 perspective it's not correct asundefened
should be primitive and objects should not. So whole values inheritance chain had to be fixed: nowV8\Value
,V8\PrimitiveValue
andV8\NameValue
are declared as abstract and MUST NOT be instantiated in userland and their usage should be type hinting and type checking only.Changes list that affect API:
*
MakeV8\Value
,V8\PrimitiveValue
andV8\NameValue
abstract;undefined
value -V8UndefenedValue
;Fix V8\Tempalte::Set() to do not accept non-primitive values;
*
- BC-breaking or potentially BC-breaking changes*