Visit Mozilla.org

JS ReportOutOfMemory

From MDC

Reports a memory allocation error for a specified JS execution context.

[edit] Syntax

void JS_ReportOutOfMemory(JSContext *cx);
Name Type Description
cx JSContext * The context in which to report the error.

[edit] Description

Call JS_ReportOutOfMemory to report that an operation failed because the system is out of memory. When the JavaScript engine tries to allocate memory and allocation fails, it reports an error as though by calling this function.

This does not cause an exception to be thrown. The error cannot be caught by scripts. See JS_ReportError and JS_SetErrorReporter for more information about error handling in the JSAPI.

LXR ID Search for JS_ReportOutOfMemory