@@ -2459,7 +2459,7 @@ var LibraryHTML5 = {
24592459 } ,
24602460#endif
24612461
2462- $setCanvasElementSize__deps : [ 'emscripten_set_canvas_element_size' , '$withStackSave' , '$allocateUTF8OnStack ' ] ,
2462+ $setCanvasElementSize__deps : [ 'emscripten_set_canvas_element_size' , '$withStackSave' , '$stringToNewUTF8OnStack ' ] ,
24632463 $setCanvasElementSize : function ( target , width , height ) {
24642464#if GL_DEBUG
24652465 dbg ( 'setCanvasElementSize(target=' + target + ',width=' + width + ',height=' + height ) ;
@@ -2471,7 +2471,7 @@ var LibraryHTML5 = {
24712471 // This function is being called from high-level JavaScript code instead of asm.js/Wasm,
24722472 // and it needs to synchronously proxy over to another thread, so marshal the string onto the heap to do the call.
24732473 withStackSave ( function ( ) {
2474- var targetInt = allocateUTF8OnStack ( target . id ) ;
2474+ var targetInt = stringToNewUTF8OnStack ( target . id ) ;
24752475 _emscripten_set_canvas_element_size ( targetInt , width , height ) ;
24762476 } ) ;
24772477 }
@@ -2533,13 +2533,13 @@ var LibraryHTML5 = {
25332533#endif
25342534
25352535 // JavaScript-friendly API, returns pair [width, height]
2536- $getCanvasElementSize__deps : [ 'emscripten_get_canvas_element_size' , '$withStackSave' , '$allocateUTF8OnStack ' ] ,
2536+ $getCanvasElementSize__deps : [ 'emscripten_get_canvas_element_size' , '$withStackSave' , '$stringToNewUTF8OnStack ' ] ,
25372537 $getCanvasElementSize : function ( target ) {
25382538 return withStackSave ( function ( ) {
25392539 var w = stackAlloc ( 8 ) ;
25402540 var h = w + 4 ;
25412541
2542- var targetInt = allocateUTF8OnStack ( target . id ) ;
2542+ var targetInt = stringToNewUTF8OnStack ( target . id ) ;
25432543 var ret = _emscripten_get_canvas_element_size ( targetInt , w , h ) ;
25442544 var size = [ { { { makeGetValue ( 'w' , 0 , 'i32' ) } } } , { { { makeGetValue ( 'h' , 0 , 'i32' ) } } } ] ;
25452545 return size ;
0 commit comments