diff options
author | alon@honor <none@none> | 2010-10-31 15:50:56 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-10-31 15:50:56 -0700 |
commit | db2dfd4026c5aaba0a4b1fc2778b1ca36bec8a62 (patch) | |
tree | eeffd846e36469148e66c7e1b58cfc8a19ca1248 /src/preamble.js | |
parent | 9343f81a117efd605ff274fd290d38d674c55d25 (diff) |
remove getters from global vars
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 22473ce9..66cb37bb 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -77,6 +77,7 @@ function Pointer_make(slab, pos, allocator) { var ret = [_malloc, Runtime.stackAlloc, Runtime.staticAlloc][allocator ? allocator : ALLOC_STATIC](Math.max(slab.length - pos, 1)); for (var i = 0; i < slab.length - pos; i++) { var curr = slab[pos + i]; + if (curr === undefined) throw 'Invalid element in slab'; // This can be caught, and you can try again to allocate later, see globalFuncs in run() if (typeof curr === 'function') { curr = Runtime.getFunctionIndex(curr); } |