diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-08-30 11:21:48 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-08-30 11:21:48 -0700 |
commit | b5b49215d4a40566380a769f47a9c1cce74a28b0 (patch) | |
tree | 68308b6059798a81f24f6a8a1ac28a0091c5d066 /src/library_memfs.js | |
parent | 1cc28b8e9e94267041bc71afebfbbe3059db4a3f (diff) | |
parent | b895cdc7df2085d324003c9df582a3dcc1927697 (diff) |
Merge branch 'incoming'
Diffstat (limited to 'src/library_memfs.js')
-rw-r--r-- | src/library_memfs.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/library_memfs.js b/src/library_memfs.js index 63326c42..354f5e95 100644 --- a/src/library_memfs.js +++ b/src/library_memfs.js @@ -2,17 +2,13 @@ mergeInto(LibraryManager.library, { $MEMFS__deps: ['$FS'], $MEMFS: { // content modes - CONTENT_OWNING: 1, // contains a subarray into the heap, and we own it - need to free() when no longer needed + CONTENT_OWNING: 1, // contains a subarray into the heap, and we own it, without copying (note: someone else needs to free() it, if that is necessary) CONTENT_FLEXIBLE: 2, // has been modified or never set to anything, and is a flexible js array that can grow/shrink CONTENT_FIXED: 3, // contains some fixed-size content written into it, in a typed array ensureFlexible: function(node) { if (node.contentMode !== MEMFS.CONTENT_FLEXIBLE) { var contents = node.contents; node.contents = Array.prototype.slice.call(contents); - if (node.contentMode === MEMFS.CONTENT_OWNING) { - assert(contents.byteOffset); - Module['_free'](contents.byteOffset); - } node.contentMode = MEMFS.CONTENT_FLEXIBLE; } }, |