diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-04-24 18:15:11 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-04-24 18:15:11 -0700 |
commit | a2f76c0fe5199a20982c46b70ab6ad273054af1f (patch) | |
tree | 1b7f43b63efa83e07d3e82a511b9c9471aa345ac /src | |
parent | 0a2001bf4f9826560be577f053dcdfd8b07dcca0 (diff) |
forgotten check for assertions
Diffstat (limited to 'src')
-rw-r--r-- | src/preamble.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 3b5eac3e..0232ff20 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -194,11 +194,13 @@ function Pointer_make(slab, pos, allocator) { var size = slab.length; var i; +#if ASSERTIONS for (i = 0; i < size; i++) { if (slab[i] === undefined) { throw 'Invalid element in slab at ' + new Error().stack; // This can be caught, and you can try again to allocate later, see globalFuncs in run() } } +#endif // Finalize var ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc][allocator ? allocator : ALLOC_STATIC](Math.max(size, 1)); |