We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
assert
1 parent c188a2c commit 75aaf0bCopy full SHA for 75aaf0b
src/preamble.js
@@ -75,6 +75,11 @@ var ABORT = false;
75
// but only when noExitRuntime is false.
76
var EXITSTATUS;
77
78
+#if ASSERTIONS || !STRICT
79
+// In STRICT mode, we only define assert() when ASSERTIONS is set. i.e. we
80
+// don't define it at all in release modes. This matches the behaviour of
81
+// MINIMAL_RUNTIME.
82
+// TODO(sbc): Make this the default even without STRICT enabled.
83
/** @type {function(*, string=)} */
84
function assert(condition, text) {
85
if (!condition) {
@@ -88,6 +93,7 @@ function assert(condition, text) {
88
93
#endif
89
94
}
90
95
96
+#endif
91
97
92
98
#if ASSERTIONS
99
// We used to include malloc/free by default in the past. Show a helpful error in
0 commit comments