Skip to content

Commit f2152f8

Browse files
cwoffendenifiddynine
authored andcommitted
Fix some closure compile warnings in JS library code (emscripten-core#21385)
# Conflicts: # src/library_browser.js
1 parent 98a742d commit f2152f8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/library_browser.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,6 @@ var LibraryBrowser = {
307307
#if ASSERTIONS
308308
if (!useWebGL) assert(typeof GLctx == 'undefined', 'cannot set in module if GLctx is used, but we are a non-GL context that would replace it');
309309
#endif
310-
311310
Module.ctx = ctx;
312311
if (useWebGL) GL.makeContextCurrent(contextHandle);
313312
Module.useWebGL = useWebGL;
@@ -790,7 +789,6 @@ var LibraryBrowser = {
790789
#if ASSERTIONS
791790
assert(runDependencies === 0, 'async_load_script must be run when no other dependencies are active');
792791
#endif
793-
794792
{{{ runtimeKeepalivePush() }}}
795793

796794
var loadDone = () => {
@@ -920,7 +918,6 @@ var LibraryBrowser = {
920918
#if ASSERTIONS
921919
assert(!Browser.mainLoop.func, 'emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters.');
922920
#endif
923-
924921
Browser.mainLoop.func = browserIterationFunc;
925922
Browser.mainLoop.arg = arg;
926923

src/library_html5.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@ var LibraryHTML5 = {
315315
// Users can also add more special event targets, basically by just doing something like
316316
// specialHTMLTargets["!canvas"] = Module.canvas;
317317
// (that will let !canvas map to the canvas held in Module.canvas).
318+
$specialHTMLTargets__docs: '/** @type {Object} */',
318319
#if ENVIRONMENT_MAY_BE_WORKER || ENVIRONMENT_MAY_BE_NODE || ENVIRONMENT_MAY_BE_SHELL || PTHREADS
319320
$specialHTMLTargets: "[0, typeof document != 'undefined' ? document : 0, typeof window != 'undefined' ? window : 0]",
320321
#else

src/library_idbfs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ addToLibrary({
1616
if (typeof indexedDB != 'undefined') return indexedDB;
1717
var ret = null;
1818
if (typeof window == 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
19+
#if ASSERTIONS
1920
assert(ret, 'IDBFS used, but indexedDB not supported');
21+
#endif
2022
return ret;
2123
},
2224
DB_VERSION: 21,

0 commit comments

Comments
 (0)