MCPcopy Create free account
hub / github.com/GoogleChrome/samples / assert

Function assert

mkbitmap/mkbitmap.js:384–388  ·  view source on GitHub ↗

@type {function(*, string=)}

(condition, text)

Source from the content-addressed store, hash-verified

382
383/** @type {function(*, string=)} */
384function assert(condition, text) {
385 if (!condition) {
386 abort('Assertion failed' + (text ? ': ' + text : ''));
387 }
388}
389
390// We used to include malloc/free by default in the past. Show a helpful error in
391// builds with assertions.

Callers 14

mkbitmap.jsFile · 0.70
writeStackCookieFunction · 0.70
initRuntimeFunction · 0.70
addRunDependencyFunction · 0.70
removeRunDependencyFunction · 0.70
createExportWrapperFunction · 0.70
receiveInstanceFunction · 0.70
ptrToStringFunction · 0.70
stringToUTF8ArrayFunction · 0.70
alignMemoryFunction · 0.70
asyncLoadFunction · 0.70

Calls 1

abortFunction · 0.70

Tested by

no test coverage detected