kopia lustrzana https://github.com/micropython/micropython
webassembly/objjsproxy: Fix handling of thrown value into JS generator.
Signed-off-by: Damien George <damien@micropython.org>pull/14328/head
rodzic
9c7f0659e2
commit
4c3f5f552b
|
@ -346,6 +346,12 @@ typedef struct _jsproxy_gen_t {
|
||||||
|
|
||||||
mp_vm_return_kind_t jsproxy_gen_resume(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value, mp_obj_t *ret_val) {
|
mp_vm_return_kind_t jsproxy_gen_resume(mp_obj_t self_in, mp_obj_t send_value, mp_obj_t throw_value, mp_obj_t *ret_val) {
|
||||||
jsproxy_gen_t *self = MP_OBJ_TO_PTR(self_in);
|
jsproxy_gen_t *self = MP_OBJ_TO_PTR(self_in);
|
||||||
|
|
||||||
|
if (throw_value) {
|
||||||
|
*ret_val = throw_value;
|
||||||
|
return MP_VM_RETURN_EXCEPTION;
|
||||||
|
}
|
||||||
|
|
||||||
switch (self->state) {
|
switch (self->state) {
|
||||||
case JSOBJ_GEN_STATE_WAITING:
|
case JSOBJ_GEN_STATE_WAITING:
|
||||||
self->state = JSOBJ_GEN_STATE_COMPLETED;
|
self->state = JSOBJ_GEN_STATE_COMPLETED;
|
||||||
|
|
Ładowanie…
Reference in New Issue