Exit cleanly for the SRPC "log" requests instead of generating crash reports.

This is to avoid spamming the crash report server for
things like validation errors, DEP unsupported, "read
error", or no memory for address space of which
we already have UMA stats for. Of those, validation is
currently the lowest ranking one.

NaClLog(LOG_FATAL, ...) would have caused the code to
run a special "gNaClLogAbortBehavior" hook, which ends up
copying data to the renderer:
https://codereview.chromium.org/469423002/

This change downgrades from LOG_FATAL to LOG_ERROR,
exposes the hook, and manually calls the hook. It leaves other
types of NaClLog(LOG_FATAL, ...) alone and allows generating
a crash report and backtrace.

See Chrome's ServiceRuntime::ReapLogs for the source of
this RPC call:
https://code.google.com/p/chromium/codesearch#chromium/src/components/nacl/renderer/plugin/service_runtime.cc&sq=package:chromium&l=225&q=ReapLogs

BUG= https://code.google.com/p/chromium/issues/detail?id=405697

TEST=

(a) ./scons run_nacl_error_log_test (still runs the
hooks and aborts)

(b) patch into chrome and build/run browser_tests.

"NativeClient: Validation failure..." from NaClBrowserTestNewlib.BadNative

and

"NativeClient: Bad ELF header magic number" from NaClBrowserTestNewlib.Bad

still show up.

(c) Also check manually check the javascript console to see the "reap logs"
and other buffered logs show up.

Review URL: https://codereview.chromium.org/997683002
4 files changed