[Verification]
Each constructor in JS should have validation
Should not generate native call in JS and c++
Change-Id: If4895868b5e61a4c4155edc746a7e7cec8c9208d
Signed-off-by: Pawel Kaczmarek <p.kaczmarek3@samsung.com>
if child.name == attr.name:
attr.existIn = x.name + "." + child.name
break
- if len([x for x in attributes if not hasattr(x, "existIn")]) > 0:
- native_function = iface.name + "Constructor"
- native_cmd = iface.name + "_constructor"
- self.ctx['cmdtable'][native_function] = native_cmd
- iface.native_function = native_function
- iface.native_cmd = native_cmd
if iface.inherit in [x.name for x in self.ctx['exportedInterface']]:
iface.private = True
#if iface.name in self.ctx['callback']:
{%- endfor -%}
{%- endif -%}) {
// constructor of {{iface.name}}
- {% if iface.constructor %}
- var nativeParam = {
- {% for arg in iface.constructor.primitiveArgs %}
- '{{arg.name}}': args.{{arg.name}}{% if not loop.last %},{% endif %}
-
- {% endfor %}
- };
- var syncResult = callNative('{{iface.name}}_constructor', nativeParam);
- {% endif %}
+ validator_.isConstructorCall(this, {{iface.name}});
{% for attribute in iface.getTypes('Attribute') %}
{% if attribute.existIn == 'ctor' %}