@@ -2459,7 +2459,7 @@ var LibraryHTML5 = {
2459
2459
} ,
2460
2460
#endif
2461
2461
2462
- $setCanvasElementSize__deps : [ 'emscripten_set_canvas_element_size' , '$withStackSave' , '$allocateUTF8OnStack ' ] ,
2462
+ $setCanvasElementSize__deps : [ 'emscripten_set_canvas_element_size' , '$withStackSave' , '$stringToUTF8OnStack ' ] ,
2463
2463
$setCanvasElementSize : function ( target , width , height ) {
2464
2464
#if GL_DEBUG
2465
2465
dbg ( 'setCanvasElementSize(target=' + target + ',width=' + width + ',height=' + height ) ;
@@ -2471,7 +2471,7 @@ var LibraryHTML5 = {
2471
2471
// This function is being called from high-level JavaScript code instead of asm.js/Wasm,
2472
2472
// and it needs to synchronously proxy over to another thread, so marshal the string onto the heap to do the call.
2473
2473
withStackSave ( function ( ) {
2474
- var targetInt = allocateUTF8OnStack ( target . id ) ;
2474
+ var targetInt = stringToUTF8OnStack ( target . id ) ;
2475
2475
_emscripten_set_canvas_element_size ( targetInt , width , height ) ;
2476
2476
} ) ;
2477
2477
}
@@ -2533,13 +2533,13 @@ var LibraryHTML5 = {
2533
2533
#endif
2534
2534
2535
2535
// 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' , '$stringToUTF8OnStack ' ] ,
2537
2537
$getCanvasElementSize : function ( target ) {
2538
2538
return withStackSave ( function ( ) {
2539
2539
var w = stackAlloc ( 8 ) ;
2540
2540
var h = w + 4 ;
2541
2541
2542
- var targetInt = allocateUTF8OnStack ( target . id ) ;
2542
+ var targetInt = stringToUTF8OnStack ( target . id ) ;
2543
2543
var ret = _emscripten_get_canvas_element_size ( targetInt , w , h ) ;
2544
2544
var size = [ { { { makeGetValue ( 'w' , 0 , 'i32' ) } } } , { { { makeGetValue ( 'h' , 0 , 'i32' ) } } } ] ;
2545
2545
return size ;
0 commit comments