You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We had some explict references to `Module.printErr` and even
`Modue.printError` (which doesn't exist). `Module.printErr`
is the external name which users can use to override `err`
but interally I think we should always prefer `err`.
Also rename a couple of local variables to avoid name colition
with printErr.
Copy file name to clipboardExpand all lines: src/library_pthread.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -651,7 +651,7 @@ var LibraryPThread = {
651
651
}
652
652
if(canvas.transferControlToOffscreen){
653
653
#if GL_DEBUG
654
-
Module['printErr']('pthread_create: canvas.transferControlToOffscreen(), transferring canvas by name "'+name+'" (DOM id="'+canvas.id+'") from main thread to pthread');
654
+
err('pthread_create: canvas.transferControlToOffscreen(), transferring canvas by name "'+name+'" (DOM id="'+canvas.id+'") from main thread to pthread');
655
655
#endif
656
656
// Create a shared information block in heap so that we can control
657
657
// the canvas size from any thread.
@@ -679,7 +679,7 @@ var LibraryPThread = {
679
679
// be able to transfer control to offscreen, but WebGL can be
680
680
// proxied from worker to main thread.
681
681
#if !OFFSCREEN_FRAMEBUFFER
682
-
Module['printErr']('pthread_create: Build with -s OFFSCREEN_FRAMEBUFFER=1 to enable fallback proxying of GL commands from pthread to main thread.');
Copy file name to clipboardExpand all lines: src/postamble.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -321,8 +321,8 @@ function checkUnflushedContent() {
321
321
// How we flush the streams depends on whether we are in SYSCALLS_REQUIRE_FILESYSTEM=0
322
322
// mode (which has its own special function for this; otherwise, all
323
323
// the code is inside libc)
324
-
varprint=out;
325
-
varprintErr=err;
324
+
varoldOut=out;
325
+
varoldErr=err;
326
326
varhas=false;
327
327
out=err=function(x){
328
328
has=true;
@@ -349,8 +349,8 @@ function checkUnflushedContent() {
349
349
});
350
350
#endif
351
351
}catch(e){}
352
-
out=print;
353
-
err=printErr;
352
+
out=oldOut;
353
+
err=oldErr;
354
354
if(has){
355
355
warnOnce('stdio streams had content in them that was not flushed. you should set EXIT_RUNTIME to 1 (see the FAQ), or make sure to emit a newline when you printf etc.');
0 commit comments