@type {function(*, string=)}
(condition, text)
| 66 | // TODO(sbc): Make this the default even without STRICT enabled. |
| 67 | /** @type {function(*, string=)} */ |
| 68 | function assert(condition, text) { |
| 69 | if (!condition) { |
| 70 | #if ASSERTIONS |
| 71 | abort('Assertion failed' + (text ? ': ' + text : '')); |
| 72 | #else |
| 73 | // This build was created without ASSERTIONS defined. `assert()` should not |
| 74 | // ever be called in this configuration but in case there are callers in |
| 75 | // the wild leave this simple abort() implementation here for now. |
| 76 | abort(text); |
| 77 | #endif |
| 78 | } |
| 79 | } |
| 80 | #endif |
| 81 | |
| 82 | #if ASSERTIONS |