diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-21 22:27:29 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-21 22:27:29 -0800 |
commit | ad9cb98dba27655710b7df337ea276ad68b9bac9 (patch) | |
tree | f47c7ae7bd2addba4c1cfe325246269638abfaaf /src/preamble.js | |
parent | 52d04311943f4ccd5ec86bb6982c6f755d7db888 (diff) |
strengthen SAFE_HEAP
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js index f02ada7a..16b55d53 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -27,8 +27,8 @@ function SAFE_HEAP_ACCESS(dest, type, store) { if (store) { HEAP_HISTORY[dest] = [{ type: type, /*stack: new Error().stack */ }]; // |stack| is useful for debugging } else { - if (!HEAP[dest] && HEAP[dest] !== 0) { - print('Warning: Reading an invalid value at ' + dest + ' :: ' + new Error().stack + '\n'); + if (!HEAP[dest] && HEAP[dest] !== 0 && HEAP[dest] !== false) { // false can be the result of a mathop comparator + throw('Warning: Reading an invalid value at ' + dest + ' :: ' + new Error().stack + '\n'); } var history = HEAP_HISTORY[dest]; assert((history && history[0]) /* || HEAP[dest] === 0 */, "Loading from where there was no store! " + dest + ',' + HEAP[dest] + ',' + type + ', \n\n' + new Error().stack + '\n'); |