diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-04 21:24:47 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-04 21:28:26 -0800 |
commit | 334bd00745bb082ee1778f672361df1b8b13125a (patch) | |
tree | 6763a7efd44b54b475858523f7420dae0b39ffb7 | |
parent | 3e7c8fb5e15ab6786da8cc72a802720e224271d1 (diff) |
assert on FS.init being only called once
-rw-r--r-- | src/library.js | 2 | ||||
-rwxr-xr-x | tests/runner.py | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/src/library.js b/src/library.js index 83a62273..48efaa08 100644 --- a/src/library.js +++ b/src/library.js @@ -303,7 +303,7 @@ LibraryManager.library = { // optional handlers. init: function(input, output, error) { // Make sure we initialize only once. - if (FS.init.initialized) return; + assert(!FS.init.initialized, 'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)'); FS.init.initialized = true; FS.ensureRoot(); diff --git a/tests/runner.py b/tests/runner.py index 2be6453b..311c8d21 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4321,7 +4321,6 @@ def process(filename): def process(filename): src = open(filename, 'a') src.write(\'\'\' - FS.init(); FS.createPath('/', 'dev/shm/tmp', true, true); FS.currentPath = '/dev/shm/tmp'; run(); |