Bug 1277034 - Ensure that OOM message is properly flushed to stderr. (r=terrence, a=KWierso)
authorEric Faust <efaustbmo@gmail.com>
Thu, 21 Jul 2016 16:21:20 -0700
changeset 346247 1da606ef3da99b620f05dbae76570646f69af5b2
parent 346246 3e6ee8c6b56b84368c3a464c86067af78971ada0
child 346248 607f7217e5ec8f910382992f752a03b5a67de36e
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence, KWierso
bugs1277034
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1277034 - Ensure that OOM message is properly flushed to stderr. (r=terrence, a=KWierso)
js/src/shell/js.cpp
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -6042,17 +6042,17 @@ js::shell::AutoReportException::~AutoRep
     RootedValue exn(cx);
     (void) JS_GetPendingException(cx, &exn);
 
     JS_ClearPendingException(cx);
 
     ShellContext* sc = GetShellContext(cx);
     js::ErrorReport report(cx);
     if (!report.init(cx, exn, js::ErrorReport::WithSideEffects)) {
-        fprintf(stderr, "out of memory initializing ErrorReport\n");
+        PrintError(cx, stderr, "out of memory initializing ErrorReport", nullptr, reportWarnings);
         JS_ClearPendingException(cx);
         return;
     }
 
     MOZ_ASSERT(!JSREPORT_IS_WARNING(report.report()->flags));
 
     FILE* fp = ErrorFilePointer();
     PrintError(cx, fp, report.message(), report.report(), reportWarnings);