Content-Length: 276593 | pFad | http://github.com/micropython/micropython/commit/e860e32e24e1c32db48f1d8b6f260c27aeb75657

C7 webassembly/objjsproxy: Fix proxying in arguments to JS new function. · micropython/micropython@e860e32 · GitHub
Skip to content

Commit e860e32

Browse files
committed
webassembly/objjsproxy: Fix proxying in arguments to JS new function.
Signed-off-by: Damien George <damien@micropython.org>
1 parent 50b43fe commit e860e32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: ports/webassembly/objjsproxy.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ EM_JS(void, js_reflect_construct, (int f_ref, uint32_t n_args, uint32_t * args,
147147
const f = proxy_js_ref[f_ref];
148148
const as = [];
149149
for (let i = 0; i < n_args; ++i) {
150-
as.push(proxy_convert_mp_to_js_obj_jsside(args + i * 4));
150+
as.push(proxy_convert_mp_to_js_obj_jsside(args + i * 3 * 4));
151151
}
152152
const ret = Reflect.construct(f, as);
153153
proxy_convert_js_to_mp_obj_jsside(ret, out);
@@ -242,7 +242,7 @@ static mp_obj_t jsproxy_reflect_construct(size_t n_args, const mp_obj_t *args) {
242242
for (unsigned int i = 0; i < n_args; ++i) {
243243
proxy_convert_mp_to_js_obj_cside(args[i], &args_conv[i * PVN]);
244244
}
245-
uint32_t out[3];
245+
uint32_t out[PVN];
246246
js_reflect_construct(arg0, n_args, args_conv, out);
247247
return proxy_convert_js_to_mp_obj_cside(out);
248248
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/micropython/micropython/commit/e860e32e24e1c32db48f1d8b6f260c27aeb75657

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy