@@ -153,10 +153,6 @@ static void _do_call(void* arg) {
153153 q -> returnValue .i =
154154 _emscripten_set_offscreencanvas_size (q -> args [0 ].cp , q -> args [1 ].i , q -> args [2 ].i );
155155 break ;
156- case EM_PROXIED_JS_FUNCTION :
157- q -> returnValue .d =
158- _emscripten_receive_on_main_thread_js ((intptr_t )q -> functionPtr , q -> callingThread , q -> args [0 ].i , & q -> args [1 ].d );
159- break ;
160156 case EM_FUNC_SIG_V :
161157 ((em_func_v )q -> functionPtr )();
162158 break ;
@@ -413,44 +409,6 @@ int emscripten_sync_run_in_main_runtime_thread_(EM_FUNC_SIGNATURE sig, void* fun
413409 return q .returnValue .i ;
414410}
415411
416- double _emscripten_run_on_main_thread_js (int index , int num_args , int64_t * buffer , int sync ) {
417- em_queued_call q ;
418- em_queued_call * c ;
419- if (sync ) {
420- q .operationDone = 0 ;
421- q .satelliteData = 0 ;
422- c = & q ;
423- } else {
424- c = em_queued_call_malloc ();
425- }
426- c -> calleeDelete = !sync ;
427- c -> functionEnum = EM_PROXIED_JS_FUNCTION ;
428- // Index not needed to ever be more than 32-bit.
429- c -> functionPtr = (void * )(intptr_t )index ;
430- c -> callingThread = pthread_self ();
431- assert (num_args + 1 <= EM_QUEUED_JS_CALL_MAX_ARGS );
432- // The types are only known at runtime in these calls, so we store values that
433- // must be able to contain any valid JS value, including a 64-bit BigInt if
434- // BigInt support is enabled. We store to an i64, which can contain both a
435- // BigInt and a JS Number which is a 64-bit double.
436- c -> args [0 ].i = num_args ;
437- for (int i = 0 ; i < num_args ; i ++ ) {
438- c -> args [i + 1 ].i64 = buffer [i ];
439- }
440-
441- if (sync ) {
442- sync_run_in_main_thread (& q );
443- // TODO: support BigInt return values somehow.
444- return q .returnValue .d ;
445- } else {
446- // 'async' runs are fire and forget, where the caller detaches itself from the call object after
447- // returning here, and it is the callee's responsibility to free up the memory after the call
448- // has been performed.
449- emscripten_async_run_in_main_thread (c );
450- return 0 ;
451- }
452- }
453-
454412void emscripten_async_run_in_main_runtime_thread_ (EM_FUNC_SIGNATURE sig , void * func_ptr , ...) {
455413 em_queued_call * q = em_queued_call_malloc ();
456414 if (!q )
0 commit comments