Skip to content

Commit

Permalink
Fix some closure compile warnings in JS library code (emscripten-core…
Browse files Browse the repository at this point in the history
…#21385)

# Conflicts:
#	src/library_browser.js
  • Loading branch information
cwoffenden authored and ifiddynine committed Mar 2, 2024
1 parent 98a742d commit f2152f8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/library_browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ var LibraryBrowser = {
#if ASSERTIONS
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');
#endif

Module.ctx = ctx;
if (useWebGL) GL.makeContextCurrent(contextHandle);
Module.useWebGL = useWebGL;
Expand Down Expand Up @@ -790,7 +789,6 @@ var LibraryBrowser = {
#if ASSERTIONS
assert(runDependencies === 0, 'async_load_script must be run when no other dependencies are active');
#endif

{{{ runtimeKeepalivePush() }}}

var loadDone = () => {
Expand Down Expand Up @@ -920,7 +918,6 @@ var LibraryBrowser = {
#if ASSERTIONS
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.');
#endif

Browser.mainLoop.func = browserIterationFunc;
Browser.mainLoop.arg = arg;

Expand Down
1 change: 1 addition & 0 deletions src/library_html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ var LibraryHTML5 = {
// Users can also add more special event targets, basically by just doing something like
// specialHTMLTargets["!canvas"] = Module.canvas;
// (that will let !canvas map to the canvas held in Module.canvas).
$specialHTMLTargets__docs: '/** @type {Object} */',
#if ENVIRONMENT_MAY_BE_WORKER || ENVIRONMENT_MAY_BE_NODE || ENVIRONMENT_MAY_BE_SHELL || PTHREADS
$specialHTMLTargets: "[0, typeof document != 'undefined' ? document : 0, typeof window != 'undefined' ? window : 0]",
#else
Expand Down
2 changes: 2 additions & 0 deletions src/library_idbfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ addToLibrary({
if (typeof indexedDB != 'undefined') return indexedDB;
var ret = null;
if (typeof window == 'object') ret = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
#if ASSERTIONS
assert(ret, 'IDBFS used, but indexedDB not supported');
#endif
return ret;
},
DB_VERSION: 21,
Expand Down

0 comments on commit f2152f8

Please sign in to comment.