E.g. if a file has 'use strict' and then tries to use the "putter", an exception will get thrown by Chakra (although the "putting" will actually succeed) because the set call returns undefined. I'd assume that this is for support of a = b = c syntax so that a and b both get assigned the value of c, e.g. similar to C++'s operator=.
This isn't actually our problem since the virtual function in JSI returns void, which then gets translated into undefined by the JSI implementation. It's unclear if this is a problem with the JSI implementation for Chakra (e.g. perhaps it should just returns what it was given as input) or JSI itself (e.g. have the return value be jsi::Value). This will however affect our consumers, so we should probably track down exactly whose issue it is. It's also unknown to me what the behavior to me is for v8/Hermes
E.g. if a file has
'use strict'
and then tries to use the "putter", an exception will get thrown by Chakra (although the "putting" will actually succeed) because the set call returnsundefined
. I'd assume that this is for support ofa = b = c
syntax so thata
andb
both get assigned the value ofc
, e.g. similar to C++'soperator=
.This isn't actually our problem since the virtual function in JSI returns
void
, which then gets translated intoundefined
by the JSI implementation. It's unclear if this is a problem with the JSI implementation for Chakra (e.g. perhaps it should just returns what it was given as input) or JSI itself (e.g. have the return value bejsi::Value
). This will however affect our consumers, so we should probably track down exactly whose issue it is. It's also unknown to me what the behavior to me is for v8/Hermes