This example shows how to trap an untrusted exception (such as a illegal memory reference in the NEXE). This debugging technique can only be used for development since it requires several command-line switches, and environment variables. The test works by loading the module and communicating with it through PostMessage. Messages from the module are sent to the Status line and/or the Log window in the page. Four seconds after the module is loaded, the JavaScript on this page sends a 'BOOM' message to the module that causes the module to dereference an illegal location in memory.
If your setup is correct (you launched Chrome with the appropriate command-line arguments and environment variables), the Log window bellow should show that the crash dump facilities are turn on. When the crash data arrives from the module, the data is forwarded to the HTTP server, which drives a decoder and sends back a stack trace to the web page.
If setup incorrectly, the NaCl module may or may not load. If the module loads, it sends a "LOADED" message to the log and crash after four seconds. Since the stack trace facilities are not enables, the script will determine that the module has crashed by detecting a missed heartbeat which the application would normally send.
NO-STATUS