Print FatalProcessOutOfMemory messages to stderr

Fixes: https://github.com/nodejs/node/issues/31905
Change-Id: Ie802e2592364640cc55555894e586ef33a2c8b6e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069397
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66398}
diff --git a/src/api/api.cc b/src/api/api.cc
index a3f8f66..4e58c3f 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -468,8 +468,8 @@
       char* first_newline = strchr(last_few_messages, '\n');
       if (first_newline == nullptr || first_newline[1] == '\0')
         first_newline = last_few_messages;
-      PrintF("\n<--- Last few GCs --->\n%s\n", first_newline);
-      PrintF("\n<--- JS stacktrace --->\n%s\n", js_stacktrace);
+      base::OS::PrintError("\n<--- Last few GCs --->\n%s\n", first_newline);
+      base::OS::PrintError("\n<--- JS stacktrace --->\n%s\n", js_stacktrace);
     }
   }
   Utils::ReportOOMFailure(isolate, location, is_heap_oom);