MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add missing prototype to worker_threads

+5 -2
+1 -1
meson/ant.version
··· 1 - 0.8.1 1 + 0.9.0
+4 -1
src/modules/worker_threads.c
··· 763 763 } 764 764 765 765 static ant_value_t worker_threads_worker_ctor(ant_t *js, ant_value_t *args, int nargs) { 766 + ant_value_t this_obj = js_getthis(js); 767 + ant_value_t proto = js_instance_proto_from_new_target(js, js_mkundef()); 768 + 766 769 if (vtype(js->new_target) == T_UNDEF) { 767 770 return js_mkerr(js, "Worker constructor requires 'new'"); 768 771 } 769 772 if (nargs < 1) return js_mkerr(js, "Worker() requires a filename or URL"); 773 + if (is_object_type(this_obj) && is_object_type(proto)) js_set_proto_init(this_obj, proto); 770 774 771 775 char *script_path = wt_path_from_specifier(js, args[0]); 772 776 if (!script_path) return js_mkerr(js, "Invalid Worker filename/URL"); ··· 822 826 } 823 827 env_store_json = env_store_heap; 824 828 825 - ant_value_t this_obj = js_getthis(js); 826 829 ant_worker_thread_t *wt = (ant_worker_thread_t *)calloc(1, sizeof(*wt)); 827 830 if (!wt) { 828 831 free(script_path);