aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-22 18:46:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-23 10:31:15 -0700
commitb88b4adc2d20191fc53b7c4b89f88ed7f3d71b14 (patch)
tree6a585ee005dce7b40f58bf6b8e772773b533efed /tools
parentecfcb187e32f87338e55e1e4a2323c5917abe8fd (diff)
own the subarrays created by file preloading, to avoid a copy
Diffstat (limited to 'tools')
-rw-r--r--tools/file_packager.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/file_packager.py b/tools/file_packager.py
index 33ccebad..33bd93d2 100644
--- a/tools/file_packager.py
+++ b/tools/file_packager.py
@@ -394,7 +394,7 @@ for file_ in data_files:
%(prepare)s
Module['FS_createPreloadedFile']('%(dirname)s', '%(basename)s', byteArray, true, true, function() {
%(finish)s
- }%(fail)s);
+ }, %(fail)s, null, true);
};
Module['addRunDependency']('fp %(filename)s');
%(varname)s.send(null);
@@ -406,7 +406,7 @@ for file_ in data_files:
'basename': basename,
'prepare': prepare,
'finish': finish,
- 'fail': '' if filename[-4:] not in AUDIO_SUFFIXES else ''', function() { Module['removeRunDependency']('fp %s') }''' % filename # workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)
+ 'fail': 'null' if filename[-4:] not in AUDIO_SUFFIXES else '''function() { Module['removeRunDependency']('fp %s') }''' % filename # workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)
}
else:
assert 0